From 909360ca8123adda5dd77a17251c3c463ac6031e Mon Sep 17 00:00:00 2001 From: Material Web Team Date: Tue, 16 Jul 2024 14:09:15 -0700 Subject: [PATCH] chore(select): fix initializer of instance members for es2022 PiperOrigin-RevId: 652971827 --- select/internal/selectoption/selectOptionController.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/select/internal/selectoption/selectOptionController.ts b/select/internal/selectoption/selectOptionController.ts index 2a2cc1485a..13d42c1cbe 100644 --- a/select/internal/selectoption/selectOptionController.ts +++ b/select/internal/selectoption/selectOptionController.ts @@ -46,7 +46,7 @@ export type SelectOptionConfig = MenuItemControllerConfig; export class SelectOptionController implements ReactiveController { private readonly menuItemController: MenuItemController; private internalDisplayText: string | null = null; - private lastSelected = this.host.selected; + private lastSelected: boolean; private firstUpdate = true; /** @@ -97,6 +97,7 @@ export class SelectOptionController implements ReactiveController { private readonly host: ReactiveControllerHost & SelectOption, config: SelectOptionConfig, ) { + this.lastSelected = this.host.selected; this.menuItemController = new MenuItemController(host, config); host.addController(this); }