Skip to content

Commit ab27c92

Browse files
refactor: remove const validation branch (#515)
1 parent 3ed494f commit ab27c92

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

index.js

-7
Original file line numberDiff line numberDiff line change
@@ -846,13 +846,6 @@ function buildValue (location, input) {
846846
code += `
847847
json += JSON.stringify(${input})
848848
`
849-
} else if ('const' in schema) {
850-
code += `
851-
if(validator.validate(${JSON.stringify(schema)}, ${input}))
852-
json += '${JSON.stringify(schema.const)}'
853-
else
854-
throw new Error(\`Item $\{JSON.stringify(${input})} does not match schema definition.\`)
855-
`
856849
} else {
857850
code += `
858851
json += JSON.stringify(${input})

0 commit comments

Comments
 (0)