Fixed double triggering of analytics events

This commit is contained in:
squidfunk
2021-02-24 10:12:40 +01:00
parent fc4deb3daf
commit 1864463e5c
10 changed files with 45 additions and 46 deletions

View File

@@ -20,7 +20,7 @@
* IN THE SOFTWARE.
*/
import { BehaviorSubject, Subject } from "rxjs"
import { Subject } from "rxjs"
/* ----------------------------------------------------------------------------
* Functions
@@ -57,5 +57,5 @@ export function setLocation(url: URL): void {
* @returns Location subject
*/
export function watchLocation(): Subject<URL> {
return new BehaviorSubject<URL>(getLocation())
return new Subject<URL>()
}

View File

@@ -219,7 +219,6 @@ export function setupInstantLoading(
const response$ = location$
.pipe(
distinctUntilKeyChanged("pathname"),
skip(1),
switchMap(url => request(url.href)
.pipe(
catchError(() => {