diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-09-06 17:46:36 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-09-06 17:46:36 -0300 |
commit | 1594885c506ed76c0f4f1dc58ab14a4fabba6be5 (patch) | |
tree | 8949860770294ffb7cf1021f6b141c4bfa7a2c44 /src/data | |
parent | 659620b7522d0e36ca15a54716b46d83f0bfc4f3 (diff) |
data: don't pass dependencies without expose properties
Diffstat (limited to 'src/data')
-rw-r--r-- | src/data/things/composite.js | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/data/things/composite.js b/src/data/things/composite.js index 805331a9..21cf365f 100644 --- a/src/data/things/composite.js +++ b/src/data/things/composite.js @@ -501,6 +501,10 @@ function compositeFrom(firstArg, secondArg) { mapDependencies, options, }) { + if (!dependencies && !mapDependencies && !options) { + return null; + } + const filteredDependencies = (dependencies ? filterProperties(availableDependencies, dependencies) @@ -629,8 +633,12 @@ function compositeFrom(firstArg, secondArg) { const result = (callingTransformForThisStep - ? expose.transform(valueSoFar, filteredDependencies, continuation) - : expose.compute(filteredDependencies, continuation)); + ? (filteredDependencies + ? expose.transform(valueSoFar, filteredDependencies, continuation) + : expose.transform(valueSoFar, continuation)) + : (filteredDependencies + ? expose.compute(filteredDependencies, continuation) + : expose.compute(continuation))); if (result !== continuationSymbol) { debug(() => [`step #${i+1} - result: exit (inferred) ->`, result]); @@ -998,7 +1006,7 @@ export function exposeUpdateValueOrContinue({ }, { - transform: (value, {}, continuation) => + transform: (value, continuation) => continuation.exit(value), }, ]); |