Skip to content

Commit

Permalink
chore: change error to assert
Browse files Browse the repository at this point in the history
  • Loading branch information
runspired committed Dec 20, 2024
1 parent 9138c0c commit 9bd788b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/store/src/-private/utils/coerce-id.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,7 @@ export function ensureStringId(id: Coercable): string {
normalized = String(id);
}

if (normalized === null) {
throw new Error(`Expected id to be a string or number, received ${String(id)}`);
}
assert(`Expected id to be a string or number, received ${String(id)}`, normalized !== null);

return normalized;
}

0 comments on commit 9bd788b

Please sign in to comment.