diff options
author | Nathan-SR <144961007+Nathan-SR@users.noreply.github.com> | 2024-10-09 17:06:59 -0400 |
---|---|---|
committer | Nathan-SR <144961007+Nathan-SR@users.noreply.github.com> | 2024-10-09 17:06:59 -0400 |
commit | 36735ff00a55ae587af5f69eef495533a1f35393 (patch) | |
tree | 9df8f19bdc1fd9137d024afb32603f02562aa70e /src/client/util/DocumentManager.ts | |
parent | 6ae5bd63d5355a03dba099a149532e7c6b1fd74a (diff) | |
parent | 1b038112b37c02d81431bc7ff622b25bb42a0858 (diff) |
Merge branch 'nathan-starter' of https://github.com/brown-dash/Dash-Web into nathan-starter
Diffstat (limited to 'src/client/util/DocumentManager.ts')
-rw-r--r-- | src/client/util/DocumentManager.ts | 8 |
1 files changed, 1 insertions, 7 deletions
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 => { |