Skip to content

Commit

Permalink
fix: update Popover logic to strip query strings from hash when check…
Browse files Browse the repository at this point in the history
…ing if the URL hash matches
  • Loading branch information
sghoweri committed Mar 17, 2020
1 parent d1e6936 commit ad9880d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/components/bolt-popover/src/popover.js
Expand Up @@ -70,9 +70,7 @@ class BoltPopover extends BoltElement {
const popoverOpenedHash = `#js-bolt-popover-${uuid}`;
const popoverClosedHash = `#js-bolt-popover-trigger-${uuid}`;

const currentHash = window.location.href.substr(
window.location.href.indexOf('#'),
);
const currentHash = window.location.hash.split('?')[0];

// if URL hash matches, auto-open or auto-close + clean up any existing URL hashes
if (currentHash === popoverOpenedHash) {
Expand Down

0 comments on commit ad9880d

Please sign in to comment.