Skip to content

Commit e37b004

Browse files
committed
fix: Recognize boxed string as schema environment too
1 parent 30fd9fd commit e37b004

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/validator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
function compile (schema, environment) {
3232
var options = {}
33-
if (typeof environment === 'object') {
33+
if (typeof environment === 'object' && !(environment instanceof String)) {
3434
options = environment
3535
environment = options.environment
3636
}

0 commit comments

Comments
 (0)