From 8a600bf8a56424e3d2cc3fb6255587c2c6aad6af Mon Sep 17 00:00:00 2001 From: Dominik Schilling Date: Fri, 12 Jul 2013 20:51:10 +0000 Subject: [PATCH] Revisions: Disable URL updating if a browser doesn't support the History API. Like IE < 10. props markjaquith. see #24736. git-svn-id: http://core.svn.wordpress.org/trunk@24689 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/js/revisions.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/wp-admin/js/revisions.js b/wp-admin/js/revisions.js index 7484dfc3ae..e7b3cef537 100644 --- a/wp-admin/js/revisions.js +++ b/wp-admin/js/revisions.js @@ -12,7 +12,7 @@ window.wp = window.wp || {}; revisions.debug = true; revisions.log = function() { - if ( revisions.debug ) + if ( window.console && revisions.debug ) console.log.apply( console, arguments ); }; @@ -342,9 +342,11 @@ window.wp = window.wp || {}; properties.baseUrl = revisions.settings.baseUrl; this.set( properties ); - // Start the router - this.router = new revisions.Router({ model: this }); - Backbone.history.start({ pushState: true }); + // Start the router if browser supports History API + if ( window.history && window.history.pushState ) { + this.router = new revisions.Router({ model: this }); + Backbone.history.start({ pushState: true }); + } }, updateLoadingStatus: function() {