Enable functionExternalModules by default

This commit is contained in:
Nick O'Leary
2021-07-15 10:07:52 +01:00
parent eb4625a0b9
commit 2cc1973f62
3 changed files with 4 additions and 4 deletions

View File

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

View File

@@ -100,7 +100,7 @@ module.exports = function(RED) {
node.fin = n.finalize ? n.finalize.trim() : "";
node.libs = n.libs || [];
if (RED.settings.functionExternalModules !== true && node.libs.length > 0) {
if (RED.settings.functionExternalModules === false && node.libs.length > 0) {
throw new Error(RED._("function.error.externalModuleNotAllowed"));
}
@@ -500,7 +500,7 @@ module.exports = function(RED) {
RED.nodes.registerType("function",FunctionNode, {
dynamicModuleList: "libs",
settings: {
functionExternalModules: { value: false, exportable: true }
functionExternalModules: { value: true, exportable: true }
}
});
RED.library.register("functions");