mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Ensure default module export is exposed in Function node
This commit is contained in:
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
Block a user