From c08db0161d147b50dbfd8ac7c49ed39a273e0aa7 Mon Sep 17 00:00:00 2001 From: Kezhik Kyzyl-ool Date: Wed, 6 Mar 2024 16:53:44 +0100 Subject: [PATCH] fix: rename --- src/runtime/TabsController.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/runtime/TabsController.ts b/src/runtime/TabsController.ts index 87df39c..32099c4 100644 --- a/src/runtime/TabsController.ts +++ b/src/runtime/TabsController.ts @@ -224,23 +224,23 @@ export class TabsController { private getTabs(target: HTMLElement): {tabs: Tab[]; nodes: NodeListOf} { const group = (target.closest(Selector.TABS) as HTMLElement)?.dataset.diplodocGroup; - const tabs = ( + const nodes = ( target.closest(Selector.TAB_LIST) as HTMLElement )?.querySelectorAll(Selector.TAB); - const result: Tab[] = []; - tabs.forEach((tabEl) => { + const tabs: Tab[] = []; + nodes.forEach((tabEl) => { const key = tabEl?.dataset.diplodocKey; if (!key) { return; } - result.push({ + tabs.push({ group, key, }); }); - return {tabs: result, nodes: tabs}; + return {tabs, nodes}; } }