Skip to content

Commit

Permalink
* xover.listener.on('render?location.hash' - bug fixed
Browse files Browse the repository at this point in the history
* xover.site.setter - restored prop assignation to fix navigation problems
  • Loading branch information
uriel-online committed Jul 17, 2024
1 parent cdf9789 commit 94f5954
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions xo.js
Original file line number Diff line number Diff line change
Expand Up @@ -1384,7 +1384,9 @@ xover.listener.on('hashchange', function () {
});

xover.listener.on('render?location.hash', function () {
let target = this.querySelector(location.hash);
let hash = top.location.hash || '#';
hash = hash.split(/\?/)[0];
let target = this.querySelector(hash);
if (target) {
target.scrollIntoView()
}
Expand Down Expand Up @@ -2048,7 +2050,7 @@ xover.site = new Proxy(Object.assign({}, history.state), {
window.dispatchEvent(new Event('hashchange'));
}
}
if (key === 'seed' && self['active'] != new_value) self['active'] = new_value;
if (key === 'seed') self['active'] = new_value;
for (let [subscriber] of xover.subscribers.site[key]) {
subscriber.evaluate()
}
Expand Down

0 comments on commit 94f5954

Please sign in to comment.