ldn-inbox-server 1.4.6 → 1.4.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/util.js +8 -1
  2. package/package.json +1 -1
package/lib/util.js CHANGED
@@ -118,7 +118,14 @@ function dynamic_handler(handler,fallback) {
118
118
  logger.debug(`trying dynamic load of ${handler} -> ${abs_handler}`);
119
119
  delete require.cache[abs_handler];
120
120
  const func = require(abs_handler).handle;
121
- return func;
121
+
122
+ if (func) {
123
+ return func;
124
+ }
125
+ else {
126
+ logger.error(`no "handle" method found in ${handler}.module.exports`);
127
+ return null;
128
+ }
122
129
  }
123
130
  }
124
131
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ldn-inbox-server",
3
- "version": "1.4.6",
3
+ "version": "1.4.7",
4
4
  "description": "A demonstration Event Notifications Inbox server",
5
5
  "main": "lib/index.js",
6
6
  "author": "Patrick Hochstenbach <Patrick.Hochstenbach@UGent.be>",