Skip to content

Commit

Permalink
fix(storybook): avoid redeclaration of const tooltipTriggerList
Browse files Browse the repository at this point in the history
  • Loading branch information
julien-deramond committed Dec 27, 2022
1 parent cf7b7e1 commit fa373b4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions stories/create-stories-from-doc.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,11 @@ const files = [
['Tags', '../_site/docs/5.2/components/tags/index.html'],
['TitleBars', '../_site/docs/5.2/components/title-bars/index.html'],
['Toasts', '../_site/docs/5.2/components/toasts/index.html'],
// Note: we need to use `var` instead of `const` to avoid `redeclaration of const tooltipTriggerList` message
['Tooltips',
'../_site/docs/5.2/components/tooltips/index.html',
'const tooltipTriggerList = [].slice.call(document.querySelectorAll(\'[data-bs-toggle="tooltip"]\'));\
const tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) {\
'var tooltipTriggerList = [].slice.call(document.querySelectorAll(\'[data-bs-toggle="tooltip"]\'));\
var tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) {\
return new boosted.Tooltip(tooltipTriggerEl);\
})']
]
Expand Down

0 comments on commit fa373b4

Please sign in to comment.