aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/DocComponent.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2025-04-21 14:09:02 -0400
committerbobzel <zzzman@gmail.com>2025-04-21 14:09:02 -0400
commit3162f50295569d1798ac2cc881e9e0455bd12fea (patch)
treedf401ec5ef79bdc9dcc77ab4bca74e667d6ca090 /src/client/views/DocComponent.tsx
parent6fde11fd2c1a1edc36adc463af526b6d33399d5b (diff)
parent1f294ef4a171eec72a069a9503629eaf7975d983 (diff)
Merge branch 'master' into aarav_edit
Diffstat (limited to 'src/client/views/DocComponent.tsx')
-rw-r--r--src/client/views/DocComponent.tsx8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/views/DocComponent.tsx b/src/client/views/DocComponent.tsx
index 45c80c6f7..1ecd82dbc 100644
--- a/src/client/views/DocComponent.tsx
+++ b/src/client/views/DocComponent.tsx
@@ -48,7 +48,7 @@ export function DocComponent<P extends DocComponentProps>() {
* This Doc inherits from the dataDoc, and may or may not inherit (or be) the layoutDoc.
*/
get rootDoc() {
- return DocCast(this.Document.rootDocument, this.Document);
+ return DocCast(this.Document.rootDocument, this.Document)!;
}
/**
@@ -64,7 +64,7 @@ export function DocComponent<P extends DocComponentProps>() {
* This may or may not inherit from the data doc.
*/
@computed get layoutDoc() {
- return this._props.LayoutTemplateString ? this.Document : Doc.Layout(this.Document, this._props.LayoutTemplate?.());
+ return this._props.LayoutTemplateString ? this.Document : Doc.LayoutDoc(this.Document, this._props.LayoutTemplate?.());
}
/**
@@ -115,7 +115,7 @@ export function ViewBoxBaseComponent<P extends FieldViewProps>() {
* consider: Document, layoutDoc, dataDoc
*/
get rootDoc() {
- return DocCast(this.Document.rootDocument, this.Document);
+ return DocCast(this.Document.rootDocument, this.Document)!;
}
/**
* This is the document being rendered by the React component. In the
@@ -189,7 +189,7 @@ export function ViewBoxAnnotatableComponent<P extends FieldViewProps>() {
* other Doc options (Document, layoutDoc, dataDoc)
*/
@computed get rootDoc() {
- return DocCast(this.Document.rootDocument, this.Document);
+ return DocCast(this.Document.rootDocument, this.Document)!;
}
/**
* This is the document being rendered. It may be a template so it may or may no inherit from the data doc.