Skip to content

Commit

Permalink
chore(prettier): format code
Browse files Browse the repository at this point in the history
  • Loading branch information
kennylam committed Nov 21, 2022
1 parent c49a04d commit 303055e
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,10 @@ class DDSTableOfContents extends HostListenerMixin(
*/
private _contentObserverCallback() {
const shadowRoot = this.shadowRoot as ShadowRoot;
const allSlots = Array.from(shadowRoot.querySelectorAll(`slot`)) as HTMLSlotElement[];
const allSlottedNodes = allSlots.flatMap(slot => slot.assignedNodes());
const allSlots = Array.from(
shadowRoot.querySelectorAll(`slot`)
) as HTMLSlotElement[];
const allSlottedNodes = allSlots.flatMap((slot) => slot.assignedNodes());
this._setTargets(allSlottedNodes);
}

Expand Down Expand Up @@ -404,7 +406,11 @@ class DDSTableOfContents extends HostListenerMixin(
this._contentMutationObserver.disconnect();
(event.target as HTMLSlotElement).assignedNodes().forEach((node) => {
if (node instanceof HTMLElement) {
this._contentMutationObserver.observe(node, { subtree: true, childList: true, attributeFilter: ['name', 'data-title'] });
this._contentMutationObserver.observe(node, {
subtree: true,
childList: true,
attributeFilter: ['name', 'data-title'],
});
}
});
}
Expand Down

0 comments on commit 303055e

Please sign in to comment.