diff --git a/src/components/widgets/filesystem/FileSystem.vue b/src/components/widgets/filesystem/FileSystem.vue index 7687a68b28..70dc601982 100644 --- a/src/components/widgets/filesystem/FileSystem.vue +++ b/src/components/widgets/filesystem/FileSystem.vue @@ -846,23 +846,21 @@ export default class FileSystem extends Mixins(StateMixin, FilesMixin, ServicesM } async handleSaveFileChanges (contents: string, restart: string) { - if (contents.length > 0) { - const file = new File([contents], this.fileEditorDialogState.filename) - if (!restart && this.fileEditorDialogState.open) this.fileEditorDialogState.loading = true - - await this.uploadFile(file, this.visiblePath, this.currentRoot, false) - this.fileEditorDialogState.loading = false - if (restart) { - if (restart === 'moonraker') { - this.serviceRestartMoonraker() - return - } - if (restart === 'klipper') { - this.firmwareRestartKlippy() - return - } - this.serviceRestartByName(restart) + const file = new File([contents], this.fileEditorDialogState.filename) + if (!restart && this.fileEditorDialogState.open) this.fileEditorDialogState.loading = true + + await this.uploadFile(file, this.visiblePath, this.currentRoot, false) + this.fileEditorDialogState.loading = false + if (restart) { + if (restart === 'moonraker') { + this.serviceRestartMoonraker() + return + } + if (restart === 'klipper') { + this.firmwareRestartKlippy() + return } + this.serviceRestartByName(restart) } }