Signed-off-by: Jo-Philipp Wich <jo@mein.io>
for (var i = 0; i < includes.length; i++) {
if (typeof(includes[i].load) == 'function') {
- tasks.push(includes[i].load());
+ tasks.push(includes[i].load().catch(L.bind(function() {
+ this.failed = true;
+ }, includes[i])));
+
has_load = true;
}
else {
for (var i = 0; i < includes.length; i++) {
var content = null;
+ if (includes[i].failed)
+ continue;
+
if (typeof(includes[i].render) == 'function')
content = includes[i].render(results ? results[i] : null);
else if (includes[i].content != null)