@@ -7098,7 +7098,10 @@ class Activity {
70987098 // Load any plugins saved in local storage.
70997099 this . pluginData = this . storage . plugins ;
71007100 if ( this . pluginData !== null && this . pluginData !== "null" ) {
7101- updatePluginObj ( this , processPluginData ( this , this . pluginData ) ) ;
7101+ updatePluginObj (
7102+ this ,
7103+ processPluginData ( this , this . pluginData , "localStorage:plugins" )
7104+ ) ;
71027105 }
71037106
71047107 // Load custom mode saved in local storage.
@@ -7399,6 +7402,7 @@ class Activity {
73997402
74007403 // Read file here.
74017404 const reader = new FileReader ( ) ;
7405+ const pluginFile = that . pluginChooser . files [ 0 ] ;
74027406
74037407 // eslint-disable-next-line no-unused-vars
74047408 reader . onload = theFile => {
@@ -7407,7 +7411,11 @@ class Activity {
74077411 //doLoadAnimation();
74087412
74097413 setTimeout ( ( ) => {
7410- const obj = processRawPluginData ( that , reader . result ) ;
7414+ const obj = processRawPluginData (
7415+ that ,
7416+ reader . result ,
7417+ pluginFile && pluginFile . name ? pluginFile . name : "local-file"
7418+ ) ;
74117419 // Save plugins to local storage.
74127420 if ( obj !== null ) {
74137421 that . storage . plugins = preparePluginExports ( that , obj ) ;
@@ -7425,7 +7433,7 @@ class Activity {
74257433 } , 200 ) ;
74267434 } ;
74277435
7428- reader . readAsText ( that . pluginChooser . files [ 0 ] ) ;
7436+ reader . readAsText ( pluginFile ) ;
74297437 } ,
74307438 false
74317439 ) ;
0 commit comments