This commit is contained in:
kuangthree 2024-02-03 17:58:55 +08:00
parent f72fe09b22
commit 284bc7f25a
1 changed files with 8 additions and 6 deletions

View File

@ -708,12 +708,14 @@ export class LibInit extends Uninstantable {
} }
else if (typeof func == 'object') { else if (typeof func == 'object') {
for (var i in func) { for (var i in func) {
if(typeof func[i] == 'function'){ if (Object.prototype.hasOwnProperty.call(func, i)) {
let checkObject = {}; if(typeof func[i] == 'function'){
checkObject[i] = func[i]; let checkObject = {};
return eval(`(function(){return ${get.stringify(checkObject)};})()`)[i]; checkObject[i] = func[i];
}else{ return eval(`(function(){return ${get.stringify(checkObject)};})()`)[i];
func[i] = lib.init.eval(func[i]); }else{
func[i] = lib.init.eval(func[i]);
}
} }
} }
} }