From 0fb80e8aa0ac9c9815bbbf89d8eada1e41177ffd Mon Sep 17 00:00:00 2001 From: Sage Abdullah Date: Tue, 23 Jan 2024 16:30:24 +0000 Subject: [PATCH] Use get reference() instead of getReference() in DropdownController --- client/src/controllers/DropdownController.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/controllers/DropdownController.ts b/client/src/controllers/DropdownController.ts index 8f6aeeb271..770023ad08 100644 --- a/client/src/controllers/DropdownController.ts +++ b/client/src/controllers/DropdownController.ts @@ -176,7 +176,7 @@ export class DropdownController extends Controller { trigger: 'click', interactive: true, ...(this.hasOffsetValue && { offset: this.offsetValue }), - getReferenceClientRect: () => this.getReference().getBoundingClientRect(), + getReferenceClientRect: () => this.reference.getBoundingClientRect(), theme: this.themeValue, plugins: this.plugins, onShow() { @@ -207,7 +207,7 @@ export class DropdownController extends Controller { /** * Use a different reference element depending on the theme. */ - getReference() { + get reference() { const toggleParent = this.toggleTarget.parentElement as HTMLElement; return this.themeValue === 'dropdown-button' ? (toggleParent.parentElement as HTMLElement)