mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Be consistent in how node settings are addressed
This commit is contained in:
parent
74ea85d19c
commit
710f1e2ca0
@ -156,7 +156,7 @@
|
||||
clearNameData("ca");
|
||||
});
|
||||
|
||||
if (RED.settings.nodeSettings.tlsConfigDisableLocalFiles) {
|
||||
if (RED.settings.tlsConfigDisableLocalFiles) {
|
||||
$("#node-config-row-uselocalfiles").hide();
|
||||
} else {
|
||||
$("#node-config-row-uselocalfiles").show();
|
||||
|
@ -117,7 +117,6 @@ var persistentSettings = {
|
||||
nodeSettings[type] = opts;
|
||||
},
|
||||
exportNodeSettings: function(safeSettings) {
|
||||
safeSettings["nodeSettings"] = {};
|
||||
for (var type in nodeSettings) {
|
||||
if (nodeSettings.hasOwnProperty(type) && !disableNodeSettings[type]) {
|
||||
var nodeTypeSettings = nodeSettings[type];
|
||||
@ -125,10 +124,12 @@ var persistentSettings = {
|
||||
if (nodeTypeSettings.hasOwnProperty(property)) {
|
||||
var setting = nodeTypeSettings[property];
|
||||
if (setting.exportable) {
|
||||
if (userSettings.hasOwnProperty(property)) {
|
||||
safeSettings["nodeSettings"][property] = userSettings[property];
|
||||
if (safeSettings.hasOwnProperty(property)) {
|
||||
// Cannot overwrite existing setting
|
||||
} else if (userSettings.hasOwnProperty(property)) {
|
||||
safeSettings[property] = userSettings[property];
|
||||
} else if (setting.hasOwnProperty('value')) {
|
||||
safeSettings["nodeSettings"][property] = setting.value;
|
||||
safeSettings[property] = setting.value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user