diff options
| author | XhmikosR <[email protected]> | 2022-12-01 20:14:33 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-12-01 20:14:33 +0200 |
| commit | 18fec8bf365e34bc8439af99eddc18ec3e14a8a1 (patch) | |
| tree | 6ca9344f328288b791c84170c8ba8e56e657253f /site | |
| parent | d16efb79b69dddaa4320f59f966a176f3fe9e8fb (diff) | |
| download | bootstrap-18fec8bf365e34bc8439af99eddc18ec3e14a8a1.tar.xz bootstrap-18fec8bf365e34bc8439af99eddc18ec3e14a8a1.zip | |
code-examples.js: switch to `firstElementChild` (#37570)
This ensures that we will get the first element child and not text
Diffstat (limited to 'site')
| -rw-r--r-- | site/assets/js/code-examples.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/site/assets/js/code-examples.js b/site/assets/js/code-examples.js index 25486c2fe..edb13598f 100644 --- a/site/assets/js/code-examples.js +++ b/site/assets/js/code-examples.js @@ -56,7 +56,7 @@ }) clipboard.on('success', event => { - const iconFirstChild = event.trigger.querySelector('.bi').firstChild + const iconFirstChild = event.trigger.querySelector('.bi').firstElementChild const tooltipBtn = bootstrap.Tooltip.getInstance(event.trigger) const namespace = 'http://www.w3.org/1999/xlink' const originalXhref = iconFirstChild.getAttributeNS(namespace, 'href') |
