Browse Source

Merge pull request #3293 from owenconti/ft/3289-boolean-default-value

#3289 - Update boolean sample function base value off of schema object
bubble
shockey 7 years ago
committed by GitHub
parent
commit
96673d1376
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/core/plugins/samples/fn.js

+ 1
- 1
src/core/plugins/samples/fn.js 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) => {


Loading…
Cancel
Save