MDL-59392 calendar: Stop polluting history with useless URLs
authorAndrew Nicols <andrew@nicols.co.uk>
Fri, 8 Sep 2017 00:53:24 +0000 (08:53 +0800)
committerAndrew Nicols <andrew@nicols.co.uk>
Mon, 11 Sep 2017 02:00:50 +0000 (10:00 +0800)
calendar/amd/build/view_manager.min.js
calendar/amd/src/view_manager.js

index 62a980b..88812a5 100644 (file)
Binary files a/calendar/amd/build/view_manager.min.js and b/calendar/amd/build/view_manager.min.js differ
index 58f9ac7..2c9791b 100644 (file)
@@ -82,7 +82,9 @@ define(['jquery', 'core/templates', 'core/notification', 'core_calendar/reposito
         var changeMonth = function(root, url, time, courseid) {
             return refreshMonthContent(root, time, courseid)
                 .then(function() {
-                    window.history.pushState({}, '', url);
+                    if (url.length && url !== '#') {
+                        window.history.pushState({}, '', url);
+                    }
                     return arguments;
                 })
                 .then(function() {