You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// initialize topSeparator inside the if condition so that every time this condition evaluated to true, a new topSeparator with incremented id will be created
369
-
consttopSeparator: ChildElement={
370
-
type: 'HTML Element',
371
-
typeId: separator.id,
372
-
name: 'separator',
373
-
childId: nextTopSeparatorId,
374
-
style: separator.style,
375
-
children: []
376
-
};
377
-
// add a topSeparator before the element that does not have one
378
-
arr.splice(index,0,topSeparator)
379
-
// update this value in state
380
-
nextTopSeparatorId+=1;
381
-
}
382
-
// check is length is > 0 or it is a nested element
383
-
if(arr[index].children.length){
384
-
// recursive call if children array
385
-
handleSeparators(arr[index].children)
386
-
}
387
-
}
388
-
returnarr;
389
-
}
361
+
// // initialize topSeparator inside the if condition so that every time this condition evaluated to true, a new topSeparator with incremented id will be created
362
+
// const topSeparator: ChildElement = {
363
+
// type: 'HTML Element',
364
+
// typeId: separator.id,
365
+
// name: 'separator',
366
+
// childId: nextTopSeparatorId,
367
+
// style: separator.style,
368
+
// children: []
369
+
// };
370
+
// // add a topSeparator before the element that does not have one
371
+
// arr.splice(index, 0, topSeparator)
372
+
// // update this value in state
373
+
// nextTopSeparatorId +=1;
374
+
// }
375
+
// // check is length is > 0 or it is a nested element
0 commit comments