diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2024-02-06 08:17:51 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2024-02-06 08:33:41 -0400 |
commit | 3913092589410a5e8a68168c6edbb59082fb5613 (patch) | |
tree | 9da51f1a03313c4a9752137f2bdffc626b3c3622 /src/data/composite/things/track/withOriginalRelease.js | |
parent | 5eac956b82276d6342b4bbe6b10fac7b3a783bc4 (diff) |
data: {with,inheritFrom}OriginalRelease: add notFoundValue input
Diffstat (limited to 'src/data/composite/things/track/withOriginalRelease.js')
-rw-r--r-- | src/data/composite/things/track/withOriginalRelease.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/data/composite/things/track/withOriginalRelease.js b/src/data/composite/things/track/withOriginalRelease.js index 6e30a0a0..c7f49657 100644 --- a/src/data/composite/things/track/withOriginalRelease.js +++ b/src/data/composite/things/track/withOriginalRelease.js @@ -1,9 +1,8 @@ // Just includes the original release of this track as a dependency. // If this track isn't a rerelease, then it'll provide null, unless the // {selfIfOriginal} option is set, in which case it'll provide this track -// itself. Note that this will early exit if the original release is -// specified by reference and that reference doesn't resolve to anything. -// Outputs to '#originalRelease' by default. +// itself. This will early exit (with notFoundValue) if the original release +// is specified by reference and that reference doesn't resolve to anything. import {input, templateCompositeFrom} from '#composite'; import find from '#find'; @@ -23,6 +22,8 @@ export default templateCompositeFrom({ validate: validateWikiData({referenceType: 'track'}), defaultDependency: 'trackData', }), + + notFoundValue: input({defaultValue: null}), }, outputs: ['#originalRelease'], @@ -60,6 +61,7 @@ export default templateCompositeFrom({ exitWithoutDependency({ dependency: '#resolvedReference', + value: input('notFoundValue'), }), { |