Handle uci intergers (#1563)

This commit is contained in:
Tim Wilkinson 2024-09-22 17:34:05 -07:00 committed by GitHub
parent 360b558b94
commit 0e1ac3ac16
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 4 deletions

View File

@ -198,11 +198,11 @@ const uciMethods =
else { else {
if (type(d) === "array") { if (type(d) === "array") {
for (let i = 0; i < length(d); i++) { for (let i = 0; i < length(d); i++) {
d[i] = replace(replace(d[i], /['<>]/g, ""), /[\r\n]/g, " "); d[i] = replace(replace(`${d[i]}`, /['<>]/g, ""), /[\r\n]/g, " ");
} }
} }
else { else {
d = replace(replace(d, /['<>]/g, ""), /[\r\n]/g, " "); d = replace(replace(`${d}`, /['<>]/g, ""), /[\r\n]/g, " ");
} }
cursor.set(a, b, c, d); cursor.set(a, b, c, d);
} }
@ -273,11 +273,11 @@ const uciMeshMethods =
else { else {
if (type(d) === "array") { if (type(d) === "array") {
for (let i = 0; i < length(d); i++) { for (let i = 0; i < length(d); i++) {
d[i] = replace(replace(d[i], /['<>]/g, ""), /[\r\n]/g, " "); d[i] = replace(replace(`${d[i]}`, /['<>]/g, ""), /[\r\n]/g, " ");
} }
} }
else { else {
d = replace(replace(d, /['<>]/g, ""), /[\r\n]/g, " "); d = replace(replace(`${d}`, /['<>]/g, ""), /[\r\n]/g, " ");
} }
cursorm.set(a, b, c, d); cursorm.set(a, b, c, d);
} }