diff --git a/ui/webui/resources/br_elements/br_toolbar/br_toolbar.ts b/ui/webui/resources/br_elements/br_toolbar/br_toolbar.ts index e358b317d4bf..684dfb558341 100644 --- a/ui/webui/resources/br_elements/br_toolbar/br_toolbar.ts +++ b/ui/webui/resources/br_elements/br_toolbar/br_toolbar.ts @@ -207,7 +207,7 @@ export class CrToolbarElement extends CrLitElement { initSlotFilledDetection() { // Style the 'extra items' slot only if it contains // content. - const toolbarExtraElement = this.querySelector('.toolbar-extra') + const toolbarExtraElement = this.shadowRoot!.querySelector('.toolbar-extra') if (!toolbarExtraElement) { console.error('Could not find "toolbar-extra" element') return