Merge branch 'MDL-59784-master' of git://github.com/andrewnicols/moodle
authorJun Pataleta <jun@moodle.com>
Wed, 23 Aug 2017 02:47:54 +0000 (10:47 +0800)
committerJun Pataleta <jun@moodle.com>
Wed, 23 Aug 2017 02:47:54 +0000 (10:47 +0800)
lib/amd/build/modal.min.js
lib/amd/src/modal.js

index 7566ff4..3560618 100644 (file)
Binary files a/lib/amd/build/modal.min.js and b/lib/amd/build/modal.min.js differ
index fbc7d9a..a49fb8f 100644 (file)
@@ -608,7 +608,7 @@ define(['jquery', 'core/templates', 'core/notification', 'core/key_codes',
      */
     Modal.prototype.asyncSet = function(value, setFunction) {
         var p = value;
-        if (typeof value === 'string') {
+        if (typeof value !== 'object' || !value.hasOwnProperty('then')) {
             p = $.Deferred();
             p.resolve(value);
         }