Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/witty-feet-breathe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"overlay-kit": patch
---

Enhance error message for duplicated id
2 changes: 1 addition & 1 deletion packages/src/context/reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
const isExisted = state.overlayOrderList.includes(action.overlay.id);

if (isExisted && state.overlayData[action.overlay.id].isOpen === true) {
throw new Error("You can't open the multiple overlays with the same overlayId. Please set a different id.");
throw new Error(`You can't open the multiple overlays with the same overlayId(${action.overlay.id}). Please set a different id.`);

Check failure on line 69 in packages/src/context/reducer.ts

View workflow job for this annotation

GitHub Actions / ci (yarn lint)

Replace ``You·can't·open·the·multiple·overlays·with·the·same·overlayId(${action.overlay.id}).·Please·set·a·different·id.`` with `⏎··········`You·can't·open·the·multiple·overlays·with·the·same·overlayId(${action.overlay.id}).·Please·set·a·different·id.`⏎········`
}

return {
Expand Down
Loading