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:
wolfcode
2024-07-08 10:25:40 +08:00
parent df69c2aea4
commit 11aa723d75

View File

@@ -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 || '';