File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change 1111 const runScript = async function ( name ) {
1212 const { main, clean, stylesheet, autoRestart } = await fakeImport ( `/scripts/${ name } .js` ) ;
1313
14- main ( )
15- . catch ( console . error ) ;
14+ main ( ) . catch ( console . error ) ;
1615
1716 if ( stylesheet ) {
1817 const link = Object . assign ( document . createElement ( 'link' ) , {
2423
2524 if ( autoRestart ) {
2625 restartListeners [ name ] = function ( changes , areaName ) {
27- if ( areaName !== 'local' ) {
28- return ;
29- }
26+ if ( areaName !== 'local' ) { return ; }
3027
31- if ( Object . keys ( changes ) . some ( key => key . startsWith ( `${ name } .preferences` ) ) ) {
28+ if ( Object . keys ( changes ) . some ( key => key . startsWith ( `${ name } .preferences` ) && changes [ key ] . oldValue !== undefined ) ) {
3229 clean ( ) . then ( main ) ;
3330 }
3431 } ;
4037 const destroyScript = async function ( name ) {
4138 const { clean, stylesheet, autoRestart } = await fakeImport ( `/scripts/${ name } .js` ) ;
4239
43- clean ( )
44- . catch ( console . error ) ;
40+ clean ( ) . catch ( console . error ) ;
4541
4642 if ( stylesheet ) {
4743 const link = document . querySelector ( `link[href="${ getURL ( `/scripts/${ name } .css` ) } "]` ) ;
You can’t perform that action at this time.
0 commit comments