diff --git a/nodes/core/io/05-tls.html b/nodes/core/io/05-tls.html
index 339279b36..2ba0acc91 100644
--- a/nodes/core/io/05-tls.html
+++ b/nodes/core/io/05-tls.html
@@ -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();
diff --git a/red/runtime/settings.js b/red/runtime/settings.js
index 14cc33b8d..02db28e9c 100644
--- a/red/runtime/settings.js
+++ b/red/runtime/settings.js
@@ -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;
}
}
}