diff --git a/noname/library/init/index.js b/noname/library/init/index.js index 735b2bb75..21e3b349c 100644 --- a/noname/library/init/index.js +++ b/noname/library/init/index.js @@ -708,12 +708,14 @@ export class LibInit extends Uninstantable { } else if (typeof func == 'object') { for (var i in func) { - if(typeof func[i] == 'function'){ - let checkObject = {}; - checkObject[i] = func[i]; - return eval(`(function(){return ${get.stringify(checkObject)};})()`)[i]; - }else{ - func[i] = lib.init.eval(func[i]); + if (Object.prototype.hasOwnProperty.call(func, i)) { + if(typeof func[i] == 'function'){ + let checkObject = {}; + checkObject[i] = func[i]; + return eval(`(function(){return ${get.stringify(checkObject)};})()`)[i]; + }else{ + func[i] = lib.init.eval(func[i]); + } } } }