From 17ac6b7baa01f328a41987e02c73b71b5b82bc3a Mon Sep 17 00:00:00 2001 From: Jon Schlinkert Date: Sun, 12 Sep 2021 03:33:51 -0400 Subject: [PATCH] lint --- index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 6d0c712..ec6a8a5 100644 --- a/index.js +++ b/index.js @@ -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}"`); }