MDL-57139 amd/templates: catch unhandled promise failure
authorDan Poltawski <dan@moodle.com>
Thu, 1 Jun 2017 13:43:23 +0000 (14:43 +0100)
committerDan Poltawski <dan@moodle.com>
Thu, 1 Jun 2017 13:54:39 +0000 (14:54 +0100)
lib/amd/src/templates.js

index e2c2f05..8dae596 100644 (file)
@@ -170,7 +170,7 @@ define(['core/mustache',
                 ready.reject('Invalid icon system specified' + config.iconsystemmodule);
             } else {
                 iconSystem = system;
-                system.init().then(ready.resolve);
+                system.init().then(ready.resolve).catch(notification.exception);
             }
         });
 
@@ -698,7 +698,7 @@ define(['core/mustache',
                 ready.reject('Invalid icon system specified' + config.iconsystem);
             } else {
                 iconSystem = system;
-                system.init().then(ready.resolve);
+                system.init().then(ready.resolve).catch(notification.exception);
             }
         });