From afb4b82d0841be5b3258216907388f7121b77819 Mon Sep 17 00:00:00 2001 From: IronKinoko Date: Sun, 22 Oct 2023 00:39:10 +0800 Subject: [PATCH] fix: replace url --- src/adapter/common/defineIframePlayer.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/adapter/common/defineIframePlayer.ts b/src/adapter/common/defineIframePlayer.ts index 25ea08d..58c7762 100644 --- a/src/adapter/common/defineIframePlayer.ts +++ b/src/adapter/common/defineIframePlayer.ts @@ -30,8 +30,9 @@ export function defineIframePlayer(config: Config) { } function setActive(url: string) { - if (window.location.href === url) return - window.history.pushState(window.history.state, '', url) + if (window.location.href !== url) { + window.history.pushState(window.history.state, '', url) + } config.setActive(url) createIframeReadyToChangeIframeSrc(url) }