diff --git a/src/core/drive/visit.ts b/src/core/drive/visit.ts index 7c4ea55ed..32e68f89d 100644 --- a/src/core/drive/visit.ts +++ b/src/core/drive/visit.ts @@ -51,7 +51,7 @@ export type VisitOptions = { shouldCacheSnapshot: boolean frame?: string acceptsStreamResponse: boolean - initiator?: Element + initiator: Element } const defaultOptions: VisitOptions = { @@ -62,6 +62,7 @@ const defaultOptions: VisitOptions = { updateHistory: true, shouldCacheSnapshot: true, acceptsStreamResponse: false, + initiator: document.documentElement, } export type VisitResponse = { @@ -87,7 +88,7 @@ export class Visit implements FetchRequestDelegate { readonly willRender: boolean readonly updateHistory: boolean readonly promise: Promise - readonly initiator?: Element + readonly initiator: Element private resolvingFunctions!: ResolvingFunctions