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