Skip to content

Commit

Permalink
Fixed deactivating non-activated chips on termination
Browse files Browse the repository at this point in the history
  • Loading branch information
drpepper committed Oct 27, 2023
1 parent 385c89f commit 9eefad4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/chip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,9 @@ export abstract class Composite extends ChipBase {
}`
);

this._terminateChildChip(thisAsAny[options.attribute] as Chip);
const existingChip = thisAsAny[options.attribute] as Chip;
if (existingChip.state !== "inactive")
this._terminateChildChip(thisAsAny[options.attribute] as Chip);
}

let providedId = options.id ?? options.attribute;
Expand Down

0 comments on commit 9eefad4

Please sign in to comment.