From 22cefba3ccf1cea2dc3362c070547f2233af4f2a Mon Sep 17 00:00:00 2001 From: bobzel Date: Wed, 28 Oct 2020 09:23:12 -0400 Subject: fixed warnings --- src/client/views/nodes/ContentFittingDocumentView.tsx | 2 +- src/client/views/nodes/PresBox.tsx | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/client/views/nodes/ContentFittingDocumentView.tsx b/src/client/views/nodes/ContentFittingDocumentView.tsx index bc3ad5bce..0c52b9044 100644 --- a/src/client/views/nodes/ContentFittingDocumentView.tsx +++ b/src/client/views/nodes/ContentFittingDocumentView.tsx @@ -40,7 +40,7 @@ export class ContentFittingDocumentView extends React.Component const tagDocs: Doc[] = []; for (const doc of this.childDocs) { const tagDoc = Cast(doc.presentationTargetDoc, Doc, null); - tagDocs.push(tagDoc) + tagDocs.push(tagDoc); } return tagDocs; } @@ -634,7 +634,7 @@ export class PresBox extends ViewBoxBaseComponent const list = Array.from(this._selectedArray.keys()).map((doc: Doc, index: any) => { const curDoc = Cast(doc, Doc, null); const tagDoc = Cast(curDoc.presentationTargetDoc!, Doc, null); - if (curDoc && curDoc === this.activeItem) return
{index + 1}. {curDoc.title}
+ if (curDoc && curDoc === this.activeItem) return
{index + 1}. {curDoc.title}
; else if (tagDoc) return
{index + 1}. {curDoc.title}
; else if (curDoc) return
{index + 1}. {curDoc.title}
; }); @@ -797,10 +797,10 @@ export class PresBox extends ViewBoxBaseComponent } getAllIndexes = (arr: Doc[], val: Doc): number[] => { - var indexes = [], i; - for (i = 0; i < arr.length; i++) - if (arr[i] === val) - indexes.push(i); + const indexes = []; + for (let i = 0; i < arr.length; i++) { + arr[i] === val && indexes.push(i); + } return indexes; } @@ -936,7 +936,7 @@ export class PresBox extends ViewBoxBaseComponent doc.presMovement = PresMovement.None; break; } - }) + }); }); @undoBatch -- cgit v1.2.3-70-g09d2