From 1c1b00e5e164ae82275e03b488a5a81eb1721234 Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Sun, 21 Feb 2021 19:36:31 -0500
Subject: fixed warning

---
 src/client/views/collections/CollectionSubView.tsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/client/views/collections/CollectionSubView.tsx')

diff --git a/src/client/views/collections/CollectionSubView.tsx b/src/client/views/collections/CollectionSubView.tsx
index 2ba45df2c..a1021b6a1 100644
--- a/src/client/views/collections/CollectionSubView.tsx
+++ b/src/client/views/collections/CollectionSubView.tsx
@@ -256,7 +256,7 @@ export function CollectionSubView<T, X>(schemaCtor: (doc: Doc) => T, moreProps?:
             const addDocument = (doc: Doc | Doc[]) => {
                 const docs = doc instanceof Doc ? [doc] : doc;
                 docs.forEach(doc => Doc.AddDocToList(Cast(Doc.UserDoc().myFileOrphans, Doc, null), "data", doc));
-                this.addDocument(doc);
+                return this.addDocument(doc);
             }
 
             if (html) {
-- 
cgit v1.2.3-70-g09d2


From dcf0389b770b06a04a45b4aedd62bf455d7848e7 Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Sun, 21 Feb 2021 19:40:38 -0500
Subject: fixed compile warnings.

---
 src/client/documents/Documents.ts                   | 2 +-
 src/client/views/LightboxView.tsx                   | 2 +-
 src/client/views/PropertiesButtons.tsx              | 2 +-
 src/client/views/collections/CollectionSubView.tsx  | 2 +-
 src/client/views/collections/CollectionTimeView.tsx | 2 +-
 src/client/views/collections/TreeView.tsx           | 1 -
 src/client/views/nodes/DocumentLinksButton.tsx      | 2 +-
 7 files changed, 6 insertions(+), 7 deletions(-)

(limited to 'src/client/views/collections/CollectionSubView.tsx')

diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts
index 1a51f7a4b..518370e7b 100644
--- a/src/client/documents/Documents.ts
+++ b/src/client/documents/Documents.ts
@@ -956,7 +956,7 @@ export namespace DocUtils {
         const filteredDocs = docFilters.length ? childDocs.filter(d => {
             if (d.z) return true;
             // if the document needs a cookie but no filter provides the cookie, then the document does not pass the filter
-            if (d["cookies"] && (!filterFacets["cookies"] || !Object.keys(filterFacets["cookies"]).some(key => d["cookies"] === key))) {
+            if (d.cookies && (!filterFacets.cookies || !Object.keys(filterFacets.cookies).some(key => d.cookies === key))) {
                 return false;
             }
             for (const facetKey of Object.keys(filterFacets).filter(fkey => fkey !== "cookies")) {
diff --git a/src/client/views/LightboxView.tsx b/src/client/views/LightboxView.tsx
index 5e810d335..e967a5b07 100644
--- a/src/client/views/LightboxView.tsx
+++ b/src/client/views/LightboxView.tsx
@@ -148,7 +148,7 @@ export class LightboxView extends React.Component<LightboxViewProps> {
             LightboxView.SetLightboxDoc(undefined);
             return;
         }
-        const { doc, target } = LightboxView._history?.lastElement()!;
+        const { doc, target } = LightboxView._history?.lastElement();
         const docView = target && DocumentManager.Instance.getLightboxDocumentView(target);
         if (docView && target) {
             LightboxView._doc = doc;
diff --git a/src/client/views/PropertiesButtons.tsx b/src/client/views/PropertiesButtons.tsx
index 53a017592..8ad5f3f2b 100644
--- a/src/client/views/PropertiesButtons.tsx
+++ b/src/client/views/PropertiesButtons.tsx
@@ -222,7 +222,7 @@ export class PropertiesButtons extends React.Component<{}, {}> {
     }
 
     @undoBatch
-    setDictation = () => SelectionManager.Views().forEach(dv => dv.rootDoc._showAudio = !dv.rootDoc._showAudio);
+    setDictation = () => SelectionManager.Views().forEach(dv => dv.rootDoc._showAudio = !dv.rootDoc._showAudio)
 
     @computed
     get dictationButton() {
diff --git a/src/client/views/collections/CollectionSubView.tsx b/src/client/views/collections/CollectionSubView.tsx
index a1021b6a1..a9438f8f7 100644
--- a/src/client/views/collections/CollectionSubView.tsx
+++ b/src/client/views/collections/CollectionSubView.tsx
@@ -257,7 +257,7 @@ export function CollectionSubView<T, X>(schemaCtor: (doc: Doc) => T, moreProps?:
                 const docs = doc instanceof Doc ? [doc] : doc;
                 docs.forEach(doc => Doc.AddDocToList(Cast(Doc.UserDoc().myFileOrphans, Doc, null), "data", doc));
                 return this.addDocument(doc);
-            }
+            };
 
             if (html) {
                 if (FormattedTextBox.IsFragment(html)) {
diff --git a/src/client/views/collections/CollectionTimeView.tsx b/src/client/views/collections/CollectionTimeView.tsx
index 8067e1d07..cd91cbf63 100644
--- a/src/client/views/collections/CollectionTimeView.tsx
+++ b/src/client/views/collections/CollectionTimeView.tsx
@@ -130,7 +130,7 @@ export class CollectionTimeView extends CollectionSubView(doc => doc) {
 
     @action
     contentsDown = (e: React.MouseEvent) => {
-        let prevFilterIndex = NumCast(this.layoutDoc._prevFilterIndex);
+        const prevFilterIndex = NumCast(this.layoutDoc._prevFilterIndex);
         if (prevFilterIndex > 0) {
             this.goTo(prevFilterIndex - 1);
         } else {
diff --git a/src/client/views/collections/TreeView.tsx b/src/client/views/collections/TreeView.tsx
index c0d3be96c..0f69602fa 100644
--- a/src/client/views/collections/TreeView.tsx
+++ b/src/client/views/collections/TreeView.tsx
@@ -32,7 +32,6 @@ import { CollectionTreeView } from './CollectionTreeView';
 import { CollectionView, CollectionViewType } from './CollectionView';
 import "./TreeView.scss";
 import React = require("react");
-import { ContextMenu } from '../ContextMenu';
 
 export interface TreeViewProps {
     document: Doc;
diff --git a/src/client/views/nodes/DocumentLinksButton.tsx b/src/client/views/nodes/DocumentLinksButton.tsx
index 8a90d5d62..18cabc309 100644
--- a/src/client/views/nodes/DocumentLinksButton.tsx
+++ b/src/client/views/nodes/DocumentLinksButton.tsx
@@ -94,7 +94,7 @@ export class DocumentLinksButton extends React.Component<DocumentLinksButtonProp
                             const rootAlias = Doc.MakeAlias(rootDoc);
                             rootAlias.x = rootAlias.y = 0;
                             return rootAlias;
-                        }
+                        };
                         let wid = rootDoc[WidthSym]();
                         const target = ((docx instanceof Doc) && docx) || Docs.Create.FreeformDocument([rootAlias()], { title: this.props.View.Document.title + "-pivot", _width: 500, _height: 500, }, docid);
                         const docs = await DocListCastAsync(Doc.GetProto(target).data);
-- 
cgit v1.2.3-70-g09d2

