|
@@ -852,6 +852,8 @@ function _convertViewElements( rootNode ) {
|
|
|
const convertedElement = rootNode.is( 'documentFragment' ) ? new ViewDocumentFragment() : _convertElement( rootNode );
|
|
const convertedElement = rootNode.is( 'documentFragment' ) ? new ViewDocumentFragment() : _convertElement( rootNode );
|
|
|
|
|
|
|
|
// Convert all child nodes.
|
|
// Convert all child nodes.
|
|
|
|
|
+ // Cache the nodes in array. Otherwise, we would skip some nodes because during iteration we move nodes
|
|
|
|
|
+ // from `rootNode` to `convertedElement`. This would interfere with iteration.
|
|
|
for ( const child of [ ...rootNode.getChildren() ] ) {
|
|
for ( const child of [ ...rootNode.getChildren() ] ) {
|
|
|
if ( convertedElement.is( 'emptyElement' ) ) {
|
|
if ( convertedElement.is( 'emptyElement' ) ) {
|
|
|
throw new Error( 'Parse error - cannot parse inside EmptyElement.' );
|
|
throw new Error( 'Parse error - cannot parse inside EmptyElement.' );
|