Skip to content

Commit 2c0c0d1

Browse files
committed
fix: throw if strict mode
1 parent 675c72e commit 2c0c0d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ function walk (opts, nodes) {
351351
}
352352

353353
// handle additional syntax errors
354-
if (typeof target !== 'object') {
354+
if (typeof target !== 'object' && opts.strictMode) {
355355
throw new Error('You must provide an array or object to loop through')
356356
}
357357

0 commit comments

Comments
 (0)