Merge pull request #41 from snird/master

Collect urls in pushstate the same way as in initial load
This commit is contained in:
Mike Cao 2020-08-22 14:24:50 -07:00 committed by GitHub
commit 8d27a0a846
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

File diff suppressed because one or more lines are too long

View File

@ -53,10 +53,11 @@ import { post, hook, doNotTrack } from '../lib/web';
/* Handle history */
const handlePush = (state, title, url) => {
const handlePush = (state, title, navaigatedUrl) => {
removeEvents();
currentRef = currentUrl;
currentUrl = url;
const url = new URL(navaigatedUrl);
currentUrl = `${url.pathname}${url.search}`;
pageView();
};