From 366d5aea5d5b320b54b9cfea9a646d7828de7bae Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 15 Feb 2023 16:10:31 +0100 Subject: [PATCH] Prevent edition with 0 task --- .../src/app/+video-studio/edit/video-studio-edit.component.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client/src/app/+video-studio/edit/video-studio-edit.component.ts b/client/src/app/+video-studio/edit/video-studio-edit.component.ts index dad083bf9..94f7b5d0b 100644 --- a/client/src/app/+video-studio/edit/video-studio-edit.component.ts +++ b/client/src/app/+video-studio/edit/video-studio-edit.component.ts @@ -69,6 +69,8 @@ export class VideoStudioEditComponent extends FormReactive implements OnInit { async runEdition () { if (this.isRunningEdition) return + if (!this.form.valid) return + if (this.noEdition()) return const title = $localize`Are you sure you want to edit "${this.video.name}"?` const listHTML = this.getTasksSummary().map(t => `
  • ${t}
  • `).join('')