11/** @file Public APIs for the SSR */
22
33import { assertTrue } from '../shared/error/assert' ;
4+ import { QError , qError } from '../shared/error/error' ;
5+ import { ERROR_CONTEXT , isRecoverable } from '../shared/error/error-handling' ;
46import { getPlatform } from '../shared/platform/platform' ;
57import type { QRL } from '../shared/qrl/qrl.public' ;
6- import { ERROR_CONTEXT , isRecoverable } from '../shared/error/error-handling' ;
7- import type { ContextId } from '../use/use-context' ;
8+ import { ChoreType } from '../shared/scheduler' ;
9+ import { _SharedContainer } from '../shared/shared-container' ;
10+ import { inflateQRL , parseQRL , wrapDeserializerProxy } from '../shared/shared-serialization' ;
11+ import { QContainerValue , type HostElement , type ObjToProxyMap } from '../shared/types' ;
812import { EMPTY_ARRAY } from '../shared/utils/flyweight' ;
913import {
1014 ELEMENT_PROPS ,
1115 ELEMENT_SEQ ,
1216 ELEMENT_SEQ_IDX ,
13- getQFuncs ,
1417 OnRenderProp ,
15- Q_PROPS_SEPARATOR ,
1618 QBaseAttr ,
1719 QContainerAttr ,
1820 QContainerSelector ,
@@ -23,19 +25,18 @@ import {
2325 QStyle ,
2426 QStyleSelector ,
2527 QSubscribers ,
28+ Q_PROPS_SEPARATOR ,
2629 USE_ON_LOCAL_SEQ_IDX ,
30+ getQFuncs ,
2731} from '../shared/utils/markers' ;
2832import { isPromise } from '../shared/utils/promises' ;
2933import { isSlotProp } from '../shared/utils/prop' ;
3034import { qDev } from '../shared/utils/qdev' ;
31- import { ChoreType } from '../shared/scheduler' ;
3235import {
3336 convertScopedStyleIdsToArray ,
3437 convertStyleIdsToString ,
3538} from '../shared/utils/scoped-styles' ;
36- import { _SharedContainer } from '../shared/shared-container' ;
37- import { inflateQRL , parseQRL , wrapDeserializerProxy } from '../shared/shared-serialization' ;
38- import { QContainerValue , type HostElement , type ObjToProxyMap } from '../shared/types' ;
39+ import type { ContextId } from '../use/use-context' ;
3940import { processVNodeData } from './process-vnode-data' ;
4041import {
4142 VNodeFlags ,
@@ -65,7 +66,6 @@ import {
6566 vnode_setProp ,
6667 type VNodeJournal ,
6768} from './vnode' ;
68- import { QError , qError } from '../shared/error/error' ;
6969
7070/** @public */
7171export function getDomContainer ( element : Element | VNode ) : IClientContainer {
@@ -190,7 +190,7 @@ export class DomContainer extends _SharedContainer implements IClientContainer {
190190 }
191191
192192 handleError ( err : any , host : HostElement ) : void {
193- if ( qDev ) {
193+ if ( qDev && host ) {
194194 // Clean vdom
195195 if ( typeof document !== 'undefined' ) {
196196 const vHost = host as VirtualVNode ;
@@ -215,7 +215,7 @@ export class DomContainer extends _SharedContainer implements IClientContainer {
215215 throw err ;
216216 }
217217 }
218- const errorStore = this . resolveContext ( host , ERROR_CONTEXT ) ;
218+ const errorStore = host && this . resolveContext ( host , ERROR_CONTEXT ) ;
219219 if ( ! errorStore ) {
220220 throw err ;
221221 }
0 commit comments