Skip to content

Commit 3da363e

Browse files
committed
bug fix
1 parent 68e6378 commit 3da363e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/logic/FeatureModel.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,9 @@ export class FeatureModelManager {
149149
delete model.features[name]
150150
// add feature name to the collection of removed features
151151
removed.push(name)
152+
// remove this feature as a child of its parent
153+
if (!feature.parent) { throw new Error('cannot remove the root feature') }
154+
removeFromArray(model.features[feature.parent].children, name)
152155
// remove all configurations of this feature
153156
for (const configuration of Object.values(model.configurations)) {
154157
delete configuration.features[name]

0 commit comments

Comments
 (0)