File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
packages/qwik/src/core/client
starters/apps/e2e/src/components/no-resume Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -148,16 +148,16 @@ export class DomContainer extends _SharedContainer implements IClientContainer {
148148 this . $setServerData$ ( ) ;
149149 element . setAttribute ( QContainerAttr , QContainerValue . RESUMED ) ;
150150 element . qContainer = this ;
151- if ( ! qTest && element . isConnected ) {
152- element . dispatchEvent ( new CustomEvent ( 'qresume' , { bubbles : true } ) ) ;
153- }
154151 const qwikStates = element . querySelectorAll ( 'script[type="qwik/state"]' ) ;
155152 if ( qwikStates . length !== 0 ) {
156153 const lastState = qwikStates [ qwikStates . length - 1 ] ;
157154 this . $rawStateData$ = JSON . parse ( lastState . textContent ! ) ;
158155 preprocessState ( this . $rawStateData$ , this ) ;
159156 this . $stateData$ = wrapDeserializerProxy ( this , this . $rawStateData$ ) as unknown [ ] ;
160157 }
158+ if ( ! qTest && element . isConnected ) {
159+ element . dispatchEvent ( new CustomEvent ( 'qresume' , { bubbles : true } ) ) ;
160+ }
161161 }
162162
163163 $setRawState$ ( id : number , vParent : ElementVNode | VirtualVNode ) : void {
Original file line number Diff line number Diff line change @@ -7,6 +7,8 @@ export const NoResume = component$(() => {
77 < div > This turns red on resume</ div >
88 < button
99 document :onQResume$ = { ( ) => {
10+ // this should not crash
11+ void sig . value ;
1012 document . body . style . color = "red" ;
1113 } }
1214 onClick$ = { ( ) => {
You can’t perform that action at this time.
0 commit comments