diff options
Diffstat (limited to 'src/data')
-rw-r--r-- | src/data/things/composite.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/data/things/composite.js b/src/data/things/composite.js index 4074aef7..700cc922 100644 --- a/src/data/things/composite.js +++ b/src/data/things/composite.js @@ -1512,8 +1512,8 @@ export const exposeConstant = templateCompositeFrom({ // Customize {mode} to select one of these modes, or default to 'null': // // * 'null': Check that the value isn't null (and not undefined either). -// * 'empty': Check that the value is neither null nor an empty array. -// This will outright error for undefined. +// * 'empty': Check that the value is neither null, undefined, nor an empty +// array. // * 'falsy': Check that the value isn't false when treated as a boolean // (nor an empty array). Keep in mind this will also be false // for values like zero and the empty string! @@ -1546,11 +1546,11 @@ export const withResultOfAvailabilityCheck = templateCompositeFrom({ switch (mode) { case 'null': - availability = value !== null && value !== undefined; + availability = value !== undefined && value !== null; break; case 'empty': - availability = !empty(value); + availability = value !== undefined && !empty(value); break; case 'falsy': |