@@ -150,7 +150,6 @@ import {
150
150
QSlotParent ,
151
151
QStyle ,
152
152
QStylesAllSelector ,
153
- qwikInspectorAttr ,
154
153
} from '../shared/utils/markers' ;
155
154
import { isHtmlElement } from '../shared/utils/types' ;
156
155
import { VNodeDataChar } from '../shared/vnode-data-types' ;
@@ -1832,48 +1831,16 @@ function materializeFromVNodeData(
1832
1831
while ( ! isElement ( child ) ) {
1833
1832
const previousChild = child ;
1834
1833
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 ,
1868
1842
}
1869
- throw qError ( QError . materializeVNodeDataError , [
1870
- childDescription ,
1871
- childDescriptionFile ,
1872
- vData ,
1873
- peek ( ) ,
1874
- nextToConsumeIdx ,
1875
- ] ) ;
1876
- }
1843
+ ) ;
1877
1844
}
1878
1845
// We pretend that style element's don't exist as they can get moved out.
1879
1846
while ( isQStyleElement ( child ) ) {
0 commit comments