diff --git a/index.js b/index.js index 996277f..0b0095a 100644 --- a/index.js +++ b/index.js @@ -43,7 +43,7 @@ const optsSchemaValidator = sharedAjvInstance.compile(optsSchema) function envSchema (_opts) { const opts = Object.assign({}, _opts) - if (opts.schema && opts.schema[Symbol.for('fluent-schema-object')]) { + if (opts.schema?.[Symbol.for('fluent-schema-object')]) { opts.schema = opts.schema.valueOf() }