Skip to content

Commit

Permalink
More descriptive assert
Browse files Browse the repository at this point in the history
  • Loading branch information
kubk committed Dec 13, 2023
1 parent 34d8fd3 commit 747ee59
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/store/card-under-review-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@ export class CardUnderReviewStore {
}

changeState(state: CardState) {
assert(this.isOpened, "The card should be opened before changing state");
assert(
this.isOpened,
`The card should be opened before changing state. Card id: ${this.id}`,
);
this.state = state;
}

Expand Down

0 comments on commit 747ee59

Please sign in to comment.