diff --git a/src/node/hooks/express/static.js b/src/node/hooks/express/static.js index e8f9afbb..9209967c 100644 --- a/src/node/hooks/express/static.js +++ b/src/node/hooks/express/static.js @@ -35,7 +35,7 @@ exports.expressCreateServer = function (hook_name, args, cb) { // serve plugin definitions // not very static, but served here so that client can do require("pluginfw/static/js/plugin-definitions.js"); args.app.get('/pluginfw/plugin-definitions.json', function (req, res, next) { - res.header("Content-Type","application/json; charset: utf-8"); + res.header("Content-Type","application/json; charset=utf-8"); res.write(JSON.stringify({"plugins": plugins.plugins, "parts": plugins.parts})); res.end(); }); diff --git a/src/static/js/pluginfw/plugins.js b/src/static/js/pluginfw/plugins.js index c5c21903..1f3acab3 100644 --- a/src/static/js/pluginfw/plugins.js +++ b/src/static/js/pluginfw/plugins.js @@ -78,6 +78,9 @@ if (exports.isClient) { exports.hooks = exports.extractHooks(exports.parts, "client_hooks"); exports.loaded = true; cb(); + }).error(function(xhr, s, err){ + console.error("Failed to load plugin-definitions: " + err); + cb(); }); } } else {