File tree Expand file tree Collapse file tree 2 files changed +9
-11
lines changed
Expand file tree Collapse file tree 2 files changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -429,8 +429,10 @@ export default class Acode {
429429 }
430430
431431 [ onPluginsLoadCompleteCallback ] ( ) {
432- for ( const key in this . #pluginWatchers) {
433- this . #pluginWatchers[ key ] . reject ( new Error ( `Plugin '${ key } ' failed to load.` ) ) ;
432+ for ( const pluginId in this . #pluginWatchers) {
433+ this . #pluginWatchers[ pluginId ] . reject (
434+ new Error ( `Plugin '${ pluginId } ' failed to load.` ) ,
435+ ) ;
434436 }
435437 this . #pluginWatchers = { } ;
436438 }
Original file line number Diff line number Diff line change @@ -105,16 +105,12 @@ export default async function loadPlugins(loadOnlyTheme = false) {
105105 BROKEN_PLUGINS . delete ( pluginId ) ;
106106 }
107107 } catch ( error ) {
108- console . error ( `Error loading plugin ${ pluginId } :` , error ) ;
108+ console . error ( `Error loading plugin ${ pluginId } :` , error ) ; git
109109 // mark plugin as broken to avoid repeated attempts until user intervenes
110- try {
111- BROKEN_PLUGINS . set ( pluginId , {
112- error : String ( error . message || error ) ,
113- timestamp : Date . now ( ) ,
114- } ) ;
115- } catch ( e ) {
116- console . warn ( "Failed to mark plugin as broken:" , e ) ;
117- }
110+ BROKEN_PLUGINS . set ( pluginId , {
111+ error : String ( error . message || error ) ,
112+ timestamp : Date . now ( ) ,
113+ } ) ;
118114 failedPlugins . push ( pluginId ) ;
119115 results . push ( false ) ;
120116 }
You can’t perform that action at this time.
0 commit comments