From afa134783f1c1bd855bac209bcae868e7668ac7a Mon Sep 17 00:00:00 2001 From: ibuler Date: Thu, 14 Feb 2019 19:01:51 +0800 Subject: [PATCH] =?UTF-8?q?[Update]=20=E5=BD=95=E5=83=8F=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E4=B8=8D=E5=86=8D=E6=98=BE=E7=A4=BA=E7=A1=AE=E8=AE=A4=E5=85=B3?= =?UTF-8?q?=E9=97=AD=E7=AA=97=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/pages/app.component.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/pages/app.component.ts b/src/app/pages/app.component.ts index 3f9d7300..a38073a7 100644 --- a/src/app/pages/app.component.ts +++ b/src/app/pages/app.component.ts @@ -23,7 +23,8 @@ export class AppComponent { @HostListener('window:beforeunload', ['$event']) unloadNotification($event: any) { const notInIframe = window.self === window.top; - if (environment.production && notInIframe) { + const notInReplay = location.pathname.indexOf('/luna/replay') === -1; + if (environment.production && notInIframe && notInReplay) { $event.returnValue = true; } }