From 79b1ae37d4a89130026a33d52139a69fbe444698 Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Thu, 15 Oct 2020 15:29:45 -0400
Subject: fixed warnings

---
 src/client/util/SharingManager.tsx | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'src/client/util/SharingManager.tsx')

diff --git a/src/client/util/SharingManager.tsx b/src/client/util/SharingManager.tsx
index 914253e3c..0cd5332ca 100644
--- a/src/client/util/SharingManager.tsx
+++ b/src/client/util/SharingManager.tsx
@@ -140,9 +140,9 @@ export class SharingManager extends React.Component<{}> {
             });
             return Promise.all(evaluating).then(() => {
                 runInAction(() => {
-                    for (let i = 0; i < sharingDocs.length; i++) {
-                        if (!this.users.find(user => user.user.email === sharingDocs[i].user.email)) {
-                            this.users.push(sharingDocs[i]);
+                    for (let sharer of sharingDocs) {
+                        if (!this.users.find(user => user.user.email === sharer.user.email)) {
+                            this.users.push(sharer);
                         }
                     }
                 });
-- 
cgit v1.2.3-70-g09d2


From 67e3a220a622ff1a1a54f04df48d57c34a3a387d Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Fri, 16 Oct 2020 01:26:01 -0400
Subject: fixed compile warn ings.

---
 src/client/util/SharingManager.tsx                   | 2 +-
 src/client/views/nodes/FilterBox.tsx                 | 2 +-
 src/client/views/presentationview/PresElementBox.tsx | 6 +++---
 src/client/views/search/SearchBox.tsx                | 2 +-
 src/fields/util.ts                                   | 4 ++--
 5 files changed, 8 insertions(+), 8 deletions(-)

(limited to 'src/client/util/SharingManager.tsx')

diff --git a/src/client/util/SharingManager.tsx b/src/client/util/SharingManager.tsx
index 0cd5332ca..2b13d2a44 100644
--- a/src/client/util/SharingManager.tsx
+++ b/src/client/util/SharingManager.tsx
@@ -140,7 +140,7 @@ export class SharingManager extends React.Component<{}> {
             });
             return Promise.all(evaluating).then(() => {
                 runInAction(() => {
-                    for (let sharer of sharingDocs) {
+                    for (const sharer of sharingDocs) {
                         if (!this.users.find(user => user.user.email === sharer.user.email)) {
                             this.users.push(sharer);
                         }
diff --git a/src/client/views/nodes/FilterBox.tsx b/src/client/views/nodes/FilterBox.tsx
index bb20f91c0..6f01e5916 100644
--- a/src/client/views/nodes/FilterBox.tsx
+++ b/src/client/views/nodes/FilterBox.tsx
@@ -224,7 +224,7 @@ export class FilterBox extends ViewBoxBaseComponent<FieldViewProps, FilterBoxDoc
 
 Scripting.addGlobal(function determineCheckedState(layoutDoc: Doc, facetHeader: string, facetValue: string) {
     const docFilters = Cast(layoutDoc._docFilters, listSpec("string"), []);
-    for (let filter of docFilters) {
+    for (const filter of docFilters) {
         const fields = filter.split(":"); // split into key:value:modifiers
         if (fields[0] === facetHeader && fields[1] === facetValue) {
             return fields[2];
diff --git a/src/client/views/presentationview/PresElementBox.tsx b/src/client/views/presentationview/PresElementBox.tsx
index 56a1cd116..ab4cadab0 100644
--- a/src/client/views/presentationview/PresElementBox.tsx
+++ b/src/client/views/presentationview/PresElementBox.tsx
@@ -192,9 +192,9 @@ export class PresElementBox extends ViewBoxBaseComponent<FieldViewProps, PresDoc
         const slide = this._itemRef.current!;
         if (slide && DragManager.docsBeingDragged.length > 0) {
             const rect = slide.getBoundingClientRect();
-            let y = e.clientY - rect.top;  //y position within the element.
-            let height = slide.clientHeight;
-            let halfLine = height / 2;
+            const y = e.clientY - rect.top;  //y position within the element.
+            const height = slide.clientHeight;
+            const halfLine = height / 2;
             if (y <= halfLine) {
                 slide.style.borderTop = "solid 2px #5B9FDD";
                 slide.style.borderBottom = "0px";
diff --git a/src/client/views/search/SearchBox.tsx b/src/client/views/search/SearchBox.tsx
index 13fcccdcf..bc00e93a5 100644
--- a/src/client/views/search/SearchBox.tsx
+++ b/src/client/views/search/SearchBox.tsx
@@ -122,7 +122,7 @@ export class SearchBox extends ViewBoxBaseComponent<FieldViewProps, SearchBoxDoc
 
         const filters: string[] = [];
 
-        for (let initFilter of initialfilters) {
+        for (const initFilter of initialfilters) {
             const fields = initFilter.split(":");
             if (fields[2] !== undefined) {
                 filters.push(fields[0]);
diff --git a/src/fields/util.ts b/src/fields/util.ts
index f27b45057..a374c7f54 100644
--- a/src/fields/util.ts
+++ b/src/fields/util.ts
@@ -370,9 +370,9 @@ export function updateFunction(target: any, prop: any, value: any, receiver: any
                 diff?.op === "$remFromSet" ? { '$remFromSet': { ["fields." + prop]: SerializationHelper.Serialize(new List<Doc>(diff.items)) } }
                     : { '$set': { ["fields." + prop]: SerializationHelper.Serialize(value) } };
         !op.$set && ((op as any).length = diff.length);
-        let prevValue = ObjectField.MakeCopy(lastValue as List<any>);
+        const prevValue = ObjectField.MakeCopy(lastValue as List<any>);
         lastValue = ObjectField.MakeCopy(value);
-        let newValue = ObjectField.MakeCopy(value);
+        const newValue = ObjectField.MakeCopy(value);
 
         if (!(value instanceof CursorField) && !(value?.some?.((v: any) => v instanceof CursorField))) {
             !receiver[UpdatingFromServer] && UndoManager.AddEvent(
-- 
cgit v1.2.3-70-g09d2

