Fix serialisation bug when editing string properties

This commit is contained in:
RobTheFiveNine
2020-10-05 18:02:31 +01:00
parent 99b7e93f2d
commit 66a7a5cf78
3 changed files with 11 additions and 3 deletions

View File

@@ -10078,8 +10078,12 @@ LGraphNode.prototype.executeAction = function(action)
input.addEventListener("blur", function(e) {
this.focus();
});
var v = node.properties[property] !== undefined ? node.properties[property] : "";
v = JSON.stringify(v);
if (type !== 'string') {
v = JSON.stringify(v);
}
input.value = v;
input.addEventListener("keydown", function(e) {
if (e.keyCode != 13) {

View File

@@ -4381,7 +4381,7 @@ $jscomp.polyfill("Object.values", function(x) {
if (l = h.querySelector("input")) {
l.addEventListener("blur", function(a) {
this.focus();
}), n = void 0 !== a.properties[b] ? a.properties[b] : "", n = JSON.stringify(n), l.value = n, l.addEventListener("keydown", function(a) {
}), n = void 0 !== a.properties[b] ? a.properties[b] : "", "string" !== f && (n = JSON.stringify(n)), l.value = n, l.addEventListener("keydown", function(a) {
13 == a.keyCode && (e(), a.preventDefault(), a.stopPropagation());
});
}

View File

@@ -10078,8 +10078,12 @@ LGraphNode.prototype.executeAction = function(action)
input.addEventListener("blur", function(e) {
this.focus();
});
var v = node.properties[property] !== undefined ? node.properties[property] : "";
v = JSON.stringify(v);
if (type !== 'string') {
v = JSON.stringify(v);
}
input.value = v;
input.addEventListener("keydown", function(e) {
if (e.keyCode != 13) {