Skip to content

Commit

Permalink
Merge pull request jumpserver#51 from jumpserver/dev
Browse files Browse the repository at this point in the history
[Update] check iframe
  • Loading branch information
ibuler committed Dec 12, 2018
2 parents 1cc8c3e + ab59842 commit 7d50f83
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/pages/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ export class AppComponent {

@HostListener('window:beforeunload', ['$event'])
unloadNotification($event: any) {
if (environment.production) {
const notInIframe = window.self === window.top;
if (environment.production && notInIframe) {
$event.returnValue = true;
}
}
Expand Down

0 comments on commit 7d50f83

Please sign in to comment.