From 67bcb9008ea8e6423b28f68cd285c7bf747454d8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Fri, 14 Oct 2016 18:36:55 +0200 Subject: [PATCH] Fix popstate event handler in WCF.ImageViewer --- wcfsetup/install/files/js/WCF.ImageViewer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wcfsetup/install/files/js/WCF.ImageViewer.js b/wcfsetup/install/files/js/WCF.ImageViewer.js index d97d3da4c1..569d909349 100644 --- a/wcfsetup/install/files/js/WCF.ImageViewer.js +++ b/wcfsetup/install/files/js/WCF.ImageViewer.js @@ -318,7 +318,7 @@ $.widget('ui.wcfImageViewer', { this.element.click($.proxy(this.open, this)); window.addEventListener('popstate', (function(event) { - if (event.state.name === 'imageViewer') { + if (event.state != null && event.state.name === 'imageViewer') { if (event.state.container === this._eventNamespace) { this.open(event); this.showImage(event.state.image); -- 2.20.1