fix: plugin.subscribeConfig was not catching exceptions
Massimo Melina committed
Dec 15, 2022 at 23:27 UTC
1b64bcf97b3cccff85dc058feaf5bd2edfc2e0e8
1 file changed
+5
-2
src/plugins.ts
+5
-2
@@ -250,8 +250,11 @@ export async function rescan() {
250
cb(last)
251
return pluginsConfig.sub(() => {
252
const now = this.getConfig(cfgKey)
253
- if (!same(now, last))
254
- cb(last = now)
253
+ if (same(now, last)) return
254
+ try { cb(last = now) }
255
+ catch(e){
256
+ console.log('plugin', id, String(e))
257
+ }
258
})
259
},
260
getHfsConfig: getConfig,