mirror of https://github.com/node-red/node-red.git
Ensure default module export is exposed in Function node
parent
859c0c7f6c
commit
b2dc1d8b23
|
@ -307,7 +307,7 @@ module.exports = function(RED) {
|
|||
var spec = module.module;
|
||||
if (spec && (spec !== "")) {
|
||||
moduleLoadPromises.push(RED.import(module.module).then(lib => {
|
||||
sandbox[vname] = lib;
|
||||
sandbox[vname] = lib.default;
|
||||
}).catch(err => {
|
||||
node.error(RED._("function.error.moduleLoadError",{module:module.spec, error:err.toString()}))
|
||||
throw err;
|
||||
|
|
Loading…
Reference in New Issue