Add functionExternalModules to settings and default to false

This commit is contained in:
Nick O'Leary
2021-03-01 18:24:16 +00:00
parent d5f4f987f2
commit c3adc956d7
3 changed files with 7 additions and 3 deletions

View File

@@ -523,7 +523,7 @@
$("#node-input-noerr").val(noerr);
this.noerr = noerr;
if (RED.settings.functionExternalModules !== false) {
if (RED.settings.functionExternalModules === true) {
var libs = $("#node-input-libs-container").editableList("items");
node.libs = [];
libs.each(function(i) {

View File

@@ -97,7 +97,7 @@ module.exports = function(RED) {
node.fin = n.finalize ? n.finalize.trim() : "";
node.libs = n.libs || [];
if (RED.settings.functionExternalModules === false && node.libs.length > 0) {
if (RED.settings.functionExternalModules !== true && node.libs.length > 0) {
throw new Error("Function node not allowed to load external modules");
}