Merge branch 'MDL-58317-master' of git://github.com/damyon/moodle
authorDan Poltawski <dan@moodle.com>
Tue, 21 Mar 2017 08:03:42 +0000 (08:03 +0000)
committerDan Poltawski <dan@moodle.com>
Tue, 21 Mar 2017 08:03:42 +0000 (08:03 +0000)
lib/amd/build/templates.min.js
lib/amd/src/templates.js

index 6a0a867..87d6ada 100644 (file)
Binary files a/lib/amd/build/templates.min.js and b/lib/amd/build/templates.min.js differ
index 8cf4c9e..9c34a7e 100644 (file)
@@ -652,9 +652,10 @@ define(['core/mustache',
             for (i = 0; i < partials.length; i++) {
                 var searchKey = this.currentThemeName + '/' + partials[i];
                 if (searchKey in templatePromises) {
-                    continue;
+                    fetchThemAll.push(templatePromises[searchKey]);
+                } else {
+                    fetchThemAll.push(this.cachePartials(partials[i]));
                 }
-                fetchThemAll.push(this.cachePartials(partials[i]));
             }
 
             return $.when.apply($, fetchThemAll).then(function() {