From abb0d2968a948f91f40f7047324fbd5d1f24f8ae Mon Sep 17 00:00:00 2001 From: luolonghao Date: Fri, 24 May 2024 12:01:58 +0800 Subject: [PATCH] chore: change debug message --- src/managers/command.ts | 2 +- src/managers/history.ts | 6 +++--- src/models/box.ts | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/managers/command.ts b/src/managers/command.ts index 5f934bc4..6460b85b 100644 --- a/src/managers/command.ts +++ b/src/managers/command.ts @@ -40,7 +40,7 @@ export class Command { public getItem(name: string): CommmandItem { const commandItem = this.commandMap.get(name); if (commandItem === undefined) { - throw new Error(`Command '${name}' does not exist.`); + throw new Error(`Command '${name}' does not exist`); } return commandItem; } diff --git a/src/managers/history.ts b/src/managers/history.ts index 59b02a9c..2d674508 100644 --- a/src/managers/history.ts +++ b/src/managers/history.ts @@ -155,7 +155,7 @@ export class History { this.index--; } this.selection.updateByBookmark(); - debug(`History undone, the last index is ${this.index}`); + debug(`History undone (index: ${this.index})`); } public redo(): void { @@ -178,7 +178,7 @@ export class History { } } this.selection.updateByBookmark(); - debug(`History redone, the last index is ${this.index}`); + debug(`History redone (index: ${this.index})`); } public continue(): void { @@ -210,6 +210,6 @@ export class History { if (emitSaveEvent) { this.event.emit('save', denormalizeValue(value)); } - debug(`History saved, the last index is ${this.index}`); + debug(`History saved (index: ${this.index})`); } } diff --git a/src/models/box.ts b/src/models/box.ts index e0cba7b0..d142abfb 100644 --- a/src/models/box.ts +++ b/src/models/box.ts @@ -197,7 +197,7 @@ export class Box { newContainer.append(content); morph(container, newContainer); } - debug(`Box '${this.name}' (id = ${this.node.id}) rendered`); + debug(`Box '${this.name}' (id: ${this.node.id}) rendered`); } // Destroys a rendered box. @@ -207,7 +207,7 @@ export class Box { boxData[this.node.id] = {}; this.event.removeAllListeners(); this.node.empty(); - debug(`Box '${this.name}' (id = ${this.node.id}) unmounted`); + debug(`Box '${this.name}' (id: ${this.node.id}) unmounted`); } // Returns a HTML string of the box.