@@ -150,7 +150,6 @@ import {
150150 QSlotParent ,
151151 QStyle ,
152152 QStylesAllSelector ,
153- qwikInspectorAttr ,
154153} from '../shared/utils/markers' ;
155154import { isHtmlElement } from '../shared/utils/types' ;
156155import { VNodeDataChar } from '../shared/vnode-data-types' ;
@@ -1832,48 +1831,16 @@ function materializeFromVNodeData(
18321831 while ( ! isElement ( child ) ) {
18331832 const previousChild = child ;
18341833 child = fastNextSibling ( child ) ;
1835- if ( ! child ) {
1836- let childDescription : string | null = null ;
1837- let childDescriptionFile : string | null = null ;
1838- if ( isDev ) {
1839- const getChildDescription = ( ) => {
1840- if ( previousChild && isElement ( previousChild ) ) {
1841- return previousChild . outerHTML ;
1842- } else if ( previousChild && isText ( previousChild ) ) {
1843- return previousChild . nodeValue ;
1844- } else {
1845- return previousChild ?. nodeName || null ;
1846- }
1847- } ;
1848-
1849- const getChildDescriptionFile = ( ) => {
1850- let previousChildWithFileLocation = previousChild ;
1851- while ( ! childDescriptionFile && previousChildWithFileLocation ) {
1852- if (
1853- isElement ( previousChildWithFileLocation ) &&
1854- previousChildWithFileLocation . hasAttribute ( qwikInspectorAttr )
1855- ) {
1856- return previousChildWithFileLocation . getAttribute ( qwikInspectorAttr ) ;
1857- }
1858- previousChildWithFileLocation =
1859- previousChildWithFileLocation . parentNode as Node | null ;
1860- }
1861- return null ;
1862- } ;
1863-
1864- childDescription = getChildDescription ( ) ;
1865- childDescriptionFile = getChildDescriptionFile ( ) ;
1866- } else {
1867- childDescription = previousChild ?. nodeName || null ;
1834+ assertDefined (
1835+ child ,
1836+ `Resuming error: Expected text or element node following:\n` ,
1837+ previousChild ,
1838+ {
1839+ metadata : vData ,
1840+ currentValue : consumeValue ( ) ,
1841+ nextIdx : nextToConsumeIdx ,
18681842 }
1869- throw qError ( QError . materializeVNodeDataError , [
1870- childDescription ,
1871- childDescriptionFile ,
1872- vData ,
1873- peek ( ) ,
1874- nextToConsumeIdx ,
1875- ] ) ;
1876- }
1843+ ) ;
18771844 }
18781845 // We pretend that style element's don't exist as they can get moved out.
18791846 while ( isQStyleElement ( child ) ) {
0 commit comments