From 398a50bc1d7e77691620a4a6752fd38d4bb391b0 Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Wed, 2 Mar 2022 14:43:48 -0500
Subject: upgraded to typescript 4.6.2

---
 src/client/views/nodes/DocumentView.tsx | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

(limited to 'src/client/views/nodes/DocumentView.tsx')

diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx
index 67486dcf4..e2380bfba 100644
--- a/src/client/views/nodes/DocumentView.tsx
+++ b/src/client/views/nodes/DocumentView.tsx
@@ -1025,19 +1025,18 @@ export class DocumentViewInternal extends DocComponent<DocumentViewInternalProps
                     display={"block"}
                     fontSize={10}
                     GetValue={() => showTitle.split(";").length === 1 ? showTitle + "=" + Field.toString(targetDoc[showTitle.split(";")[0]] as any as Field) : "#" + showTitle}
-                    SetValue={undoBatch(input => {
+                    SetValue={undoBatch((input: string) => {
                         if (input?.startsWith("#")) {
                             if (this.props.showTitle) {
                                 this.rootDoc._showTitle = input?.substring(1) ? input.substring(1) : undefined;
                             } else {
                                 Doc.UserDoc().showTitle = input?.substring(1) ? input.substring(1) : "creationDate";
                             }
-                            return true;
                         } else {
-                            var value = input.replace(new RegExp(showTitle + "="), "");
+                            var value = input.replace(new RegExp(showTitle + "="), "") as string | number;
                             if (showTitle !== "title" && Number(value).toString() === value) value = Number(value);
                             if (showTitle.includes("Date") || showTitle === "author") return true;
-                            return Doc.SetInPlace(targetDoc, showTitle, value, true) ? true : true;
+                            Doc.SetInPlace(targetDoc, showTitle, value, true);
                         }
                         return true;
                     })}
@@ -1148,7 +1147,7 @@ export class DocumentView extends React.Component<DocumentViewProps> {
     get LayoutFieldKey() { return this.docView?.LayoutFieldKey || "layout"; }
     get fitWidth() { return this.props.fitWidth?.(this.rootDoc) || this.layoutDoc.fitWidth; }
 
-    @computed get docViewPath() { return this.props.docViewPath ? [...this.props.docViewPath(), this] : [this]; }
+    @computed get docViewPath(): DocumentView[] { return this.props.docViewPath ? [...this.props.docViewPath(), this] : [this]; }
     @computed get layoutDoc() { return Doc.Layout(this.Document, this.props.LayoutTemplate?.()); }
     @computed get nativeWidth() {
         return this.docView?._componentView?.reverseNativeScaling?.() ? 0 :
-- 
cgit v1.2.3-70-g09d2

