File tree Expand file tree Collapse file tree 2 files changed +4
-18
lines changed Expand file tree Collapse file tree 2 files changed +4
-18
lines changed Original file line number Diff line number Diff line change @@ -271,14 +271,7 @@ EasyCoder.domain.webson = EasyCoder_Webson;
271
271
break ;
272
272
case `#content` :
273
273
// 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 ) ;
282
275
if ( symbols [ `#debug` ] >= 2 ) {
283
276
console . log ( `#content: ${ value } -> ${ val } ` ) ;
284
277
}
@@ -340,7 +333,7 @@ EasyCoder.domain.webson = EasyCoder_Webson;
340
333
const path = value [ name ] ;
341
334
Webson . include ( element , name , path , symbols ) ;
342
335
} else if ( Array . isArray ( value ) ) {
343
- for ( const item of value ) {
336
+ for ( item of value ) {
344
337
const defs = Object . keys ( item ) ;
345
338
const name = defs [ 0 ] ;
346
339
const path = item [ name ] ;
Original file line number Diff line number Diff line change @@ -271,14 +271,7 @@ EasyCoder.domain.webson = EasyCoder_Webson;
271
271
break ;
272
272
case `#content` :
273
273
// 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 ) ;
282
275
if ( symbols [ `#debug` ] >= 2 ) {
283
276
console . log ( `#content: ${ value } -> ${ val } ` ) ;
284
277
}
@@ -340,7 +333,7 @@ EasyCoder.domain.webson = EasyCoder_Webson;
340
333
const path = value [ name ] ;
341
334
Webson . include ( element , name , path , symbols ) ;
342
335
} else if ( Array . isArray ( value ) ) {
343
- for ( const item of value ) {
336
+ for ( item of value ) {
344
337
const defs = Object . keys ( item ) ;
345
338
const name = defs [ 0 ] ;
346
339
const path = item [ name ] ;
You can’t perform that action at this time.
0 commit comments