Explorar el Código

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

bubble
Owen Conti hace 7 años
padre
commit
8b073757fe
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. +1
    -1
      src/core/plugins/samples/fn.js

+ 1
- 1
src/core/plugins/samples/fn.js Ver fichero

@@ -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) => {


Cargando…
Cancelar
Guardar