Skip to content

Commit

Permalink
feat(options): fix map incorrect options map reinitialization
Browse files Browse the repository at this point in the history
  • Loading branch information
nattallius committed Aug 23, 2022
1 parent 34e0fb8 commit 1b3d174
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/plugins/header/options/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@ export class UIPOptions extends UIPPlugin {

protected render(options = UIPOptions.UIPOptionsConfig) {
options = options.filter(option => !option.canActivate || option.canActivate(this));
const entries: [string, UIPOption][] = options.map(option => [option.rootControlledAttr, UIPOption.create(option)]);
this.options = new Map(entries);
options.forEach((option) => this.options.set(option.rootControlledAttr, UIPOption.create(option)));
this.options.forEach(option => this.append(option));
}

Expand Down

0 comments on commit 1b3d174

Please sign in to comment.