Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
jonschlinkert committed Sep 12, 2021
1 parent b057b1b commit 17ac6b7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ const isUnsafeKey = key => {

const validateKey = key => {
if (typeof key !== 'string' && typeof key !== 'number') {
key = String(key)
key = String(key);
}

if (isUnsafeKey(key)) {
throw new Error(`Cannot set unsafe key: "${key}"`);
}
Expand Down

0 comments on commit 17ac6b7

Please sign in to comment.