fix(easy-admin): prevent js error when operat is not object
When the operat parameter passed to the easy-admin.js plugin is not an object,it previously caused a JavaScript error. This fix adds a check to ensure that operat is indeed an object before processing it, thus preventing the error.
This commit is contained in:
@@ -614,7 +614,9 @@ define(["jquery", "tableSelect"], function ($, tableSelect) {
|
||||
}
|
||||
|
||||
} else if (typeof item === 'object') {
|
||||
|
||||
$.each(item, function (i, operat) {
|
||||
if (typeof operat !== 'object') return
|
||||
operat.class = operat.class || '';
|
||||
operat.icon = operat.icon || '';
|
||||
operat.auth = operat.auth || '';
|
||||
|
||||
Reference in New Issue
Block a user