From: Tim Düsterhus Date: Fri, 14 Oct 2016 16:36:55 +0000 (+0200) Subject: Fix popstate event handler in WCF.ImageViewer X-Git-Tag: 3.0.0_Beta_3~44 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=67bcb9008ea8e6423b28f68cd285c7bf747454d8;p=GitHub%2FWoltLab%2FWCF.git Fix popstate event handler in WCF.ImageViewer --- 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);