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) -> loadPlugin = (pluginPath) ->
return new Promise (resolve, reject) -> return new Promise (resolve, reject) ->
$.getJSON(pluginPath).then (plugin) -> success = (plugin) ->
window.taigaContribPlugins.push(plugin) window.taigaContribPlugins.push(plugin)
if plugin.css if plugin.css
@ -45,6 +45,11 @@ loadPlugin = (pluginPath) ->
else else
resolve() resolve()
fail = () ->
console.error("error loading", pluginPath);
$.getJSON(pluginPath).then(success, fail)
loadPlugins = (plugins) -> loadPlugins = (plugins) ->
promises = [] promises = []
_.map plugins, (pluginPath) -> _.map plugins, (pluginPath) ->