#3289 - Update boolean sample function to accept schema object and return value based off of schema's default value (if exists)

This commit is contained in:
Owen Conti
2017-06-25 09:59:12 -06:00
parent 165c1d7fcb
commit 8b073757fe

View File

@@ -9,7 +9,7 @@ const primitives = {
"number": () => 0,
"number_float": () => 0.0,
"integer": () => 0,
"boolean": () => true
"boolean": (schema) => typeof schema.default === "boolean" ? schema.default : true
}
const primitive = (schema) => {