refactor: update command execute methods to return CommandResult | undefined

This commit is contained in:
Maze Winther
2026-04-03 03:13:49 +02:00
parent 3516bd69f4
commit 1a8a1e889a
42 changed files with 1492 additions and 1463 deletions
@@ -33,7 +33,7 @@ export class PasteCommand extends Command {
}
execute(): CommandResult | undefined {
if (this.clipboardItems.length === 0) return;
if (this.clipboardItems.length === 0) return undefined;
const editor = EditorCore.getInstance();
this.savedState = editor.timeline.getTracks();
@@ -123,6 +123,7 @@ export class PasteCommand extends Command {
if (this.pastedElements.length > 0) {
return { select: this.pastedElements };
}
return undefined;
}
undo(): void {