This commit is contained in:
Vanessa 2023-05-06 19:36:54 +08:00
parent db6521181e
commit f85b5d6740
4 changed files with 43 additions and 10 deletions

View file

@ -23,7 +23,7 @@ export const loadPlugins = (app: App) => {
const exportsObj: { [key: string]: any } = {};
const moduleObj = {exports: exportsObj};
try {
runCode(item.js, "plugin:" + encodeURIComponent(item.id))(getObject, moduleObj, exportsObj);
runCode(item.js, "plugin:" + encodeURIComponent(item.name))(getObject, moduleObj, exportsObj);
} catch (e) {
console.error(`eval plugin ${item.name} error:`, e);
return;