Skip to content

Commit 57d4231

Browse files
committed
fix(plugins): improve handling of broken plugins by using BROKEN_PLUGINS set
Signed-off-by: 7HR4IZ3 <90985774+7HR4IZ3@users.noreply.github.com>
1 parent 818dcc9 commit 57d4231

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

src/lib/acode.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import files from "lib/fileList";
3030
import fileTypeHandler from "lib/fileTypeHandler";
3131
import fonts from "lib/fonts";
3232
import {
33+
BROKEN_PLUGINS,
3334
LOADED_PLUGINS,
3435
onPluginLoadCallback,
3536
onPluginsLoadCompleteCallback,
@@ -78,10 +79,8 @@ export default class Acode {
7879
*/
7980
clearBrokenPluginMark(pluginId) {
8081
try {
81-
const broken = appSettings.value.pluginsBroken || {};
82-
if (broken[pluginId]) {
83-
delete broken[pluginId];
84-
appSettings.update(false);
82+
if (BROKEN_PLUGINS.has(pluginId)) {
83+
BROKEN_PLUGINS.delete(pluginId);
8584
}
8685
} catch (e) {
8786
console.warn("Failed to clear broken plugin mark:", e);

0 commit comments

Comments
 (0)