Skip to content

Commit

Permalink
chore: change debug message
Browse files Browse the repository at this point in the history
  • Loading branch information
luolonghao committed May 24, 2024
1 parent a5ae9e7 commit abb0d29
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/managers/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
6 changes: 3 additions & 3 deletions src/managers/history.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down Expand Up @@ -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})`);
}
}
4 changes: 2 additions & 2 deletions src/models/box.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand Down

0 comments on commit abb0d29

Please sign in to comment.