log error when there are plugins with wrong path

stable
Juanfran 2016-07-26 13:01:28 +02:00
parent c7ea967997
commit 065a3af3d6
1 changed files with 6 additions and 1 deletions

View File

@ -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) ->