@@ -846,23 +846,21 @@ export default class FileSystem extends Mixins(StateMixin, FilesMixin, ServicesM
846
846
}
847
847
848
848
async handleSaveFileChanges (contents : string , restart : string ) {
849
- if (contents .length > 0 ) {
850
- const file = new File ([contents ], this .fileEditorDialogState .filename )
851
- if (! restart && this .fileEditorDialogState .open ) this .fileEditorDialogState .loading = true
852
-
853
- await this .uploadFile (file , this .visiblePath , this .currentRoot , false )
854
- this .fileEditorDialogState .loading = false
855
- if (restart ) {
856
- if (restart === ' moonraker' ) {
857
- this .serviceRestartMoonraker ()
858
- return
859
- }
860
- if (restart === ' klipper' ) {
861
- this .firmwareRestartKlippy ()
862
- return
863
- }
864
- this .serviceRestartByName (restart )
849
+ const file = new File ([contents ], this .fileEditorDialogState .filename )
850
+ if (! restart && this .fileEditorDialogState .open ) this .fileEditorDialogState .loading = true
851
+
852
+ await this .uploadFile (file , this .visiblePath , this .currentRoot , false )
853
+ this .fileEditorDialogState .loading = false
854
+ if (restart ) {
855
+ if (restart === ' moonraker' ) {
856
+ this .serviceRestartMoonraker ()
857
+ return
858
+ }
859
+ if (restart === ' klipper' ) {
860
+ this .firmwareRestartKlippy ()
861
+ return
865
862
}
863
+ this .serviceRestartByName (restart )
866
864
}
867
865
}
868
866
0 commit comments