From 065a3af3d660b39f7252ca48a5a628f6c2bfbddc Mon Sep 17 00:00:00 2001 From: Juanfran Date: Tue, 26 Jul 2016 13:01:28 +0200 Subject: [PATCH] log error when there are plugins with wrong path --- app-loader/app-loader.coffee | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app-loader/app-loader.coffee b/app-loader/app-loader.coffee index cee8fe74..2951fb09 100644 --- a/app-loader/app-loader.coffee +++ b/app-loader/app-loader.coffee @@ -33,7 +33,7 @@ loadStylesheet = (path) -> loadPlugin = (pluginPath) -> return new Promise (resolve, reject) -> - $.getJSON(pluginPath).then (plugin) -> + success = (plugin) -> window.taigaContribPlugins.push(plugin) if plugin.css @@ -45,6 +45,11 @@ loadPlugin = (pluginPath) -> else resolve() + fail = () -> + console.error("error loading", pluginPath); + + $.getJSON(pluginPath).then(success, fail) + loadPlugins = (plugins) -> promises = [] _.map plugins, (pluginPath) ->