There was an error while loading. Please reload this page.
2 parents 010f017 + 383b72d commit b057b1bCopy full SHA for b057b1b
1 file changed
index.js
@@ -18,6 +18,9 @@ const isUnsafeKey = key => {
18
};
19
20
const validateKey = key => {
21
+ if (typeof key !== 'string' && typeof key !== 'number') {
22
+ key = String(key)
23
+ }
24
if (isUnsafeKey(key)) {
25
throw new Error(`Cannot set unsafe key: "${key}"`);
26
}
0 commit comments