MDL-59392 calendar: Stop polluting history with useless URLs
[moodle.git] / calendar / amd / src / view_manager.js
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() {