FIX: Support popState on static 404 page

This commit is contained in:
Robin Ward 2014-10-15 14:42:18 -04:00
parent 022ca25fea
commit a967d4dfba
1 changed files with 6 additions and 0 deletions

View File

@ -41,5 +41,11 @@
document.getElementById('google-query').value = 'site:<%= local_domain %> ' + searchValue;
return true;
}
window.onpopstate = function(event) {
if (!window.hasOwnProperty("Discourse")) { //check if Discourse object exists if not take care of back navigation
window.location = document.location;
}
};
</script>
<%- end %>