Skip to content

Commit 0c904f7

Browse files
committed
fix: iteration of iterators requires more configuration so we are now more specific with Array.from
1 parent 7a67890 commit 0c904f7

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

packages/uui-select/lib/uui-select.element.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
import { css, html, LitElement } from 'lit';
21
import { defineElement } from '@umbraco-ui/uui-base/lib/registration';
2+
import { css, html, LitElement } from 'lit';
33
import { property, state } from 'lit/decorators.js';
4+
45
import { UUISelectEvent } from './UUISelectEvent';
56

67
// TODO: Dont set a global interface, we should expose a 'local' interface.
@@ -231,13 +232,13 @@ export class UUISelectElement extends LitElement {
231232
private _extractGroups() {
232233
if (this.options.length === 0) return;
233234

234-
this._groups = [
235-
...new Set(
235+
this._groups = Array.from(
236+
new Set(
236237
this.options
237238
.filter(option => option.group)
238239
.map(option => option.group as string)
239-
),
240-
];
240+
)
241+
);
241242
}
242243

243244
willUpdate(changedProperties: Map<string | number | symbol, unknown>) {

0 commit comments

Comments
 (0)