From 862cb00e40aa6f094aff019a44f52ebfca90ab88 Mon Sep 17 00:00:00 2001 From: Kristóf Marussy Date: Tue, 22 Nov 2022 16:35:42 +0100 Subject: fix(frontend): mobx 6.7.0 typing Also bumps some dependencies and updates tsconfig.json The added workarounds should be remove once https://github.com/mobxjs/mobx/issues/3582 is resolved. --- subprojects/frontend/src/editor/scrollbarViewPlugin.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'subprojects/frontend/src/editor/scrollbarViewPlugin.ts') diff --git a/subprojects/frontend/src/editor/scrollbarViewPlugin.ts b/subprojects/frontend/src/editor/scrollbarViewPlugin.ts index c95e581d..0edaeb70 100644 --- a/subprojects/frontend/src/editor/scrollbarViewPlugin.ts +++ b/subprojects/frontend/src/editor/scrollbarViewPlugin.ts @@ -128,10 +128,11 @@ export default function scrollbarViewPlugin( Math.max(1, endLine - startLine) * lineHeight, ); - let annotation: HTMLDivElement; + let annotation: HTMLDivElement | undefined; if (i < annotations.length) { annotation = annotations[i]; - } else { + } + if (annotation === undefined) { annotation = ownerDocument.createElement('div'); annotations.push(annotation); holder.appendChild(annotation); -- cgit v1.2.3-54-g00ecf