From 25755efeeed57450ecfaa31633380137242463fa Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Fri, 19 Dec 2014 10:56:19 -0500 Subject: [PATCH] FIX: Safari 7 changed popstate behavior --- app/views/exceptions/not_found.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/exceptions/not_found.html.erb b/app/views/exceptions/not_found.html.erb index ca44c1d80..4a4a7db01 100644 --- a/app/views/exceptions/not_found.html.erb +++ b/app/views/exceptions/not_found.html.erb @@ -43,7 +43,7 @@ } window.onpopstate = function(event) { - if (!window.hasOwnProperty("Discourse")) { //check if Discourse object exists if not take care of back navigation + if (event.state && !window.hasOwnProperty("Discourse")) { //check if Discourse object exists if not take care of back navigation window.location = document.location; } };