mirror of
https://github.com/smallfawn/decode_action.git
synced 2025-12-21 09:14:53 +08:00
Update main.js
This commit is contained in:
@@ -38,12 +38,18 @@ const plugins = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
for (let plugin of plugins) {
|
for (let plugin of plugins) {
|
||||||
|
try {
|
||||||
const code = plugin.plugin(sourceCode);
|
const code = plugin.plugin(sourceCode);
|
||||||
if (code && code !== processedCode) {
|
if (code && code !== processedCode) {
|
||||||
processedCode = code;
|
processedCode = code;
|
||||||
pluginUsed = plugin.name;
|
pluginUsed = plugin.name;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error(`插件 ${plugin.name} 处理时发生错误: ${error.message}`);
|
||||||
|
// 继续循环尝试下一个插件
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (processedCode !== sourceCode) {
|
if (processedCode !== sourceCode) {
|
||||||
|
|||||||
Reference in New Issue
Block a user