From 747ee59d68d028b9760a001d3129459691195b50 Mon Sep 17 00:00:00 2001 From: Gorbachev Egor <7gorbachevm@gmail.com> Date: Wed, 13 Dec 2023 19:20:56 +0700 Subject: [PATCH] More descriptive assert --- src/store/card-under-review-store.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/store/card-under-review-store.ts b/src/store/card-under-review-store.ts index 86a4f304..6eebbf00 100644 --- a/src/store/card-under-review-store.ts +++ b/src/store/card-under-review-store.ts @@ -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; }