diff --git a/src/array/reduce.ts b/src/array/reduce.ts index 12f04a7..f5d78e1 100644 --- a/src/array/reduce.ts +++ b/src/array/reduce.ts @@ -9,7 +9,7 @@ function use(...args: any[]) { } function valid(key: string) { - if (typeof key === 'string') { + if (typeof key !== 'string') { throw new Error(`Resolved key must be a string, actual: value - ${key} type - ${typeof key}`) } return key