From 41ed22a1286864a290ee7fc39aeadb51ce65d9ff Mon Sep 17 00:00:00 2001 From: Igor Bezlepkin Date: Wed, 26 Nov 2025 21:30:55 +0300 Subject: [PATCH] Remove redundant nullish coalescing operators in popover and tooltip (#2553) Co-authored-by: codecalm --- .changeset/redundant-nullish-operator.md | 6 ++++++ core/js/src/popover.js | 2 +- core/js/src/tooltip.js | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 .changeset/redundant-nullish-operator.md diff --git a/.changeset/redundant-nullish-operator.md b/.changeset/redundant-nullish-operator.md new file mode 100644 index 000000000..83ba05d56 --- /dev/null +++ b/.changeset/redundant-nullish-operator.md @@ -0,0 +1,6 @@ +--- +"@tabler/core": patch +--- + +Removed redundant nullish coalescing operator from `html` option in popover and tooltip initialization. + diff --git a/core/js/src/popover.js b/core/js/src/popover.js index 9785ed0ee..ab778f876 100644 --- a/core/js/src/popover.js +++ b/core/js/src/popover.js @@ -7,7 +7,7 @@ let popoverTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggl popoverTriggerList.map(function (popoverTriggerEl) { let options = { delay: { show: 50, hide: 50 }, - html: popoverTriggerEl.getAttribute('data-bs-html') === 'true' ?? false, + html: popoverTriggerEl.getAttribute('data-bs-html') === 'true', placement: popoverTriggerEl.getAttribute('data-bs-placement') ?? 'auto', } return new Popover(popoverTriggerEl, options) diff --git a/core/js/src/tooltip.js b/core/js/src/tooltip.js index b528eb1c4..e509ea8ca 100644 --- a/core/js/src/tooltip.js +++ b/core/js/src/tooltip.js @@ -4,7 +4,7 @@ let tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggl tooltipTriggerList.map(function (tooltipTriggerEl) { let options = { delay: { show: 50, hide: 50 }, - html: tooltipTriggerEl.getAttribute('data-bs-html') === 'true' ?? false, + html: tooltipTriggerEl.getAttribute('data-bs-html') === 'true', placement: tooltipTriggerEl.getAttribute('data-bs-placement') ?? 'auto', } return new Tooltip(tooltipTriggerEl, options)