Skip to content

Commit 48f5bba

Browse files
committed
rename uniqueIdSuffix
1 parent dffa9c3 commit 48f5bba

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

web_src/js/features/comp/ComboMarkdownEditor.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -211,16 +211,16 @@ export class ComboMarkdownEditor {
211211

212212
// Fomantic Tab requires the "data-tab" to be globally unique.
213213
// So here it uses our defined "data-tab-for" and "data-tab-panel" to generate the "data-tab" attribute for Fomantic.
214-
const uniqueIdSuffix = generateElemId();
214+
const tabIdSuffix = generateElemId();
215215
this.tabEditor = Array.from(tabs).find((tab) => tab.getAttribute('data-tab-for') === 'markdown-writer');
216216
this.tabPreviewer = Array.from(tabs).find((tab) => tab.getAttribute('data-tab-for') === 'markdown-previewer');
217-
this.tabEditor.setAttribute('data-tab', `markdown-writer-${uniqueIdSuffix}`);
218-
this.tabPreviewer.setAttribute('data-tab', `markdown-previewer-${uniqueIdSuffix}`);
217+
this.tabEditor.setAttribute('data-tab', `markdown-writer-${tabIdSuffix}`);
218+
this.tabPreviewer.setAttribute('data-tab', `markdown-previewer-${tabIdSuffix}`);
219219

220220
const panelEditor = this.container.querySelector('.ui.tab[data-tab-panel="markdown-writer"]');
221221
const panelPreviewer = this.container.querySelector('.ui.tab[data-tab-panel="markdown-previewer"]');
222-
panelEditor.setAttribute('data-tab', `markdown-writer-${uniqueIdSuffix}`);
223-
panelPreviewer.setAttribute('data-tab', `markdown-previewer-${uniqueIdSuffix}`);
222+
panelEditor.setAttribute('data-tab', `markdown-writer-${tabIdSuffix}`);
223+
panelPreviewer.setAttribute('data-tab', `markdown-previewer-${tabIdSuffix}`);
224224

225225
this.tabEditor.addEventListener('click', () => {
226226
requestAnimationFrame(() => {

0 commit comments

Comments
 (0)