From 1b038112b37c02d81431bc7ff622b25bb42a0858 Mon Sep 17 00:00:00 2001 From: bobzel Date: Fri, 4 Oct 2024 22:02:23 -0400 Subject: from last --- src/client/util/DocumentManager.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src/client/util') diff --git a/src/client/util/DocumentManager.ts b/src/client/util/DocumentManager.ts index 966731656..4ab2e8d05 100644 --- a/src/client/util/DocumentManager.ts +++ b/src/client/util/DocumentManager.ts @@ -142,13 +142,7 @@ export class DocumentManager { } public getDocViewIndex(target: Doc): number { - const docViewArray = DocumentManager.Instance.DocumentViews; - for (let i = 0; i < docViewArray.length; ++i){ - if (docViewArray[i].Document == target){ - return i; - } - } - return -1; + return DocumentManager.Instance.DocumentViews.findIndex(dv => dv.Document === target); } public getLightboxDocumentView = (toFind: Doc): DocumentView | undefined => { -- cgit v1.2.3-70-g09d2