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 82aae6f commit b7b674e
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 b7b674e

Please sign in to comment.