From a24e1f152d9930dec1cba4a9a24f11fe034b4e81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Sun, 19 Jan 2014 20:55:46 +0100 Subject: [PATCH] BUGFIX: clicking cancel should not reload the page when assets have changed. --- .../discourse/initializers/1_init_message_bus.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/discourse/initializers/1_init_message_bus.js b/app/assets/javascripts/discourse/initializers/1_init_message_bus.js index b4c0fd56341..04bce514c93 100644 --- a/app/assets/javascripts/discourse/initializers/1_init_message_bus.js +++ b/app/assets/javascripts/discourse/initializers/1_init_message_bus.js @@ -15,8 +15,10 @@ Discourse.addInitializer(function() { // since we can do this transparently for people browsing the forum // hold back the message a couple of hours setTimeout(function() { - bootbox.confirm(I18n.lookup("assets_changed_confirm"), function(){ - document.location.reload(); + bootbox.confirm(I18n.lookup("assets_changed_confirm"), function(result){ + if (result) { + document.location.reload(); + } }); }, 1000 * 60 * 120); }