aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client/documents/DocUtils.ts2
-rw-r--r--src/client/util/DocumentManager.ts8
-rw-r--r--src/client/views/nodes/DataVizBox/DataVizBox.tsx2
3 files changed, 2 insertions, 10 deletions
diff --git a/src/client/documents/DocUtils.ts b/src/client/documents/DocUtils.ts
index 0699ea09f..1130a9ae8 100644
--- a/src/client/documents/DocUtils.ts
+++ b/src/client/documents/DocUtils.ts
@@ -1,5 +1,3 @@
-/* eslint-disable prefer-destructuring */
-/* eslint-disable default-param-last */
/* eslint-disable no-use-before-define */
import { IconProp } from '@fortawesome/fontawesome-svg-core';
import { saveAs } from 'file-saver';
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 => {
diff --git a/src/client/views/nodes/DataVizBox/DataVizBox.tsx b/src/client/views/nodes/DataVizBox/DataVizBox.tsx
index a44014444..896048ab3 100644
--- a/src/client/views/nodes/DataVizBox/DataVizBox.tsx
+++ b/src/client/views/nodes/DataVizBox/DataVizBox.tsx
@@ -513,7 +513,7 @@ export class DataVizBox extends ViewBoxAnnotatableComponent<FieldViewProps>() {
DocCreatorMenu.Instance.setTemplateDocs(this.getPossibleTemplates());
};
- specificContextMenu = (e: MouseEventHandler) => {
+ specificContextMenu = (e: React.MouseEvent) => {
const cm = ContextMenu.Instance;
const options = cm.findByDescription('Options...');
const optionItems = options?.subitems ?? [];