MDL-57139 amd/user_date: always return
authorDan Poltawski <dan@moodle.com>
Thu, 1 Jun 2017 13:43:00 +0000 (14:43 +0100)
committerDan Poltawski <dan@moodle.com>
Thu, 1 Jun 2017 13:54:39 +0000 (14:54 +0100)
lib/amd/src/user_date.js

index d739f54..826ce41 100644 (file)
@@ -127,8 +127,9 @@ define(['jquery', 'core/ajax', 'core/sessionstorage', 'core/config'],
                 addToLocalStorage(key, value);
                 date.deferred.resolve(value);
             });
+            return;
         })
-        .fail(function(ex) {
+        .catch(function(ex) {
             // If we failed to retrieve the dates then reject the date's
             // deferred objects to make sure they don't hang.
             dates.forEach(function(date) {