Przeglądaj źródła

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

bubble
Owen Conti 7 lat temu
rodzic
commit
8b073757fe
1 zmienionych plików z 1 dodań i 1 usunięć
  1. +1
    -1
      src/core/plugins/samples/fn.js

+ 1
- 1
src/core/plugins/samples/fn.js Wyświetl plik

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


Ładowanie…
Anuluj
Zapisz