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)