diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-11-04 21:19:44 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-11-04 21:19:44 -0300 |
commit | 527e4618fdc57d80ac79ca9ceb3eed60fca90d6b (patch) | |
tree | a379bb63402407f6b0a757f01f5ef313639104a1 /src/data/things | |
parent | 5aad4eae6629eaa1e4dd849b03abff8888afdb4d (diff) |
data: always require at least one step for nesting compositions
Diffstat (limited to 'src/data/things')
-rw-r--r-- | src/data/things/composite.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/data/things/composite.js b/src/data/things/composite.js index c3b08f86..113f0a4f 100644 --- a/src/data/things/composite.js +++ b/src/data/things/composite.js @@ -637,6 +637,10 @@ export function compositeFrom(description) { const compositionNests = description.compose ?? true; + if (compositionNests && empty(steps)) { + aggregate.push(new TypeError(`Expected at least one step`)); + } + // Steps default to exposing if using a shorthand syntax where flags aren't // specified at all. const stepsExpose = |