Skip to content

Commit c10cccf

Browse files
committed
Revert
1 parent 0fa777c commit c10cccf

File tree

2 files changed

+4
-18
lines changed

2 files changed

+4
-18
lines changed

dist/plugins/webson.js

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -271,14 +271,7 @@ EasyCoder.domain.webson = EasyCoder_Webson;
271271
break;
272272
case `#content`:
273273
// Handle the content of the element
274-
// If it's an array, catenate the elements
275-
var val;
276-
if (Array.isArray(value)) {
277-
for (const item of value) {
278-
val += Webson.expand(element, item, symbols);
279-
}
280-
} else {
281-
val = Webson.expand(element, value, symbols);
274+
const val = Webson.expand(element, value, symbols);
282275
if (symbols[`#debug`] >= 2) {
283276
console.log(`#content: ${value} -> ${val}`);
284277
}
@@ -340,7 +333,7 @@ EasyCoder.domain.webson = EasyCoder_Webson;
340333
const path = value[name];
341334
Webson.include(element, name, path, symbols);
342335
} else if (Array.isArray(value)) {
343-
for (const item of value) {
336+
for (item of value) {
344337
const defs = Object.keys(item);
345338
const name = defs[0];
346339
const path = item[name];

js/plugins/webson.js

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -271,14 +271,7 @@ EasyCoder.domain.webson = EasyCoder_Webson;
271271
break;
272272
case `#content`:
273273
// Handle the content of the element
274-
// If it's an array, catenate the elements
275-
var val;
276-
if (Array.isArray(value)) {
277-
for (const item of value) {
278-
val += Webson.expand(element, item, symbols);
279-
}
280-
} else {
281-
val = Webson.expand(element, value, symbols);
274+
const val = Webson.expand(element, value, symbols);
282275
if (symbols[`#debug`] >= 2) {
283276
console.log(`#content: ${value} -> ${val}`);
284277
}
@@ -340,7 +333,7 @@ EasyCoder.domain.webson = EasyCoder_Webson;
340333
const path = value[name];
341334
Webson.include(element, name, path, symbols);
342335
} else if (Array.isArray(value)) {
343-
for (const item of value) {
336+
for (item of value) {
344337
const defs = Object.keys(item);
345338
const name = defs[0];
346339
const path = item[name];

0 commit comments

Comments
 (0)