mirror of
https://github.com/kremalicious/umami.git
synced 2024-12-19 15:53:39 +01:00
Merge pull request #94 from jnettome/history-state-fix
Fixes tracker code bug on handling pushState
This commit is contained in:
commit
2078005780
@ -58,15 +58,15 @@ import { removeTrailingSlash } from '../lib/url';
|
||||
|
||||
/* Handle history */
|
||||
|
||||
const handlePush = (state, title, navaigatedUrl) => {
|
||||
const handlePush = (state, title, navigatedURL) => {
|
||||
removeEvents();
|
||||
currentRef = currentUrl;
|
||||
|
||||
if (navaigatedUrl.startsWith('http')) {
|
||||
const url = new URL(navaigatedUrl);
|
||||
if (navigatedURL.toString().startsWith('http')) {
|
||||
const url = new URL(navigatedURL.toString());
|
||||
currentUrl = `${url.pathname}${url.search}`;
|
||||
} else {
|
||||
currentUrl = navaigatedUrl;
|
||||
currentUrl = navigatedURL.toString();
|
||||
}
|
||||
|
||||
pageView();
|
||||
|
Loading…
Reference in New Issue
Block a user