aboutsummaryrefslogtreecommitdiffstats
path: root/subprojects/frontend/src/editor/scrollbarViewPlugin.ts
diff options
context:
space:
mode:
Diffstat (limited to 'subprojects/frontend/src/editor/scrollbarViewPlugin.ts')
-rw-r--r--subprojects/frontend/src/editor/scrollbarViewPlugin.ts5
1 files changed, 3 insertions, 2 deletions
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(
128 Math.max(1, endLine - startLine) * lineHeight, 128 Math.max(1, endLine - startLine) * lineHeight,
129 ); 129 );
130 130
131 let annotation: HTMLDivElement; 131 let annotation: HTMLDivElement | undefined;
132 if (i < annotations.length) { 132 if (i < annotations.length) {
133 annotation = annotations[i]; 133 annotation = annotations[i];
134 } else { 134 }
135 if (annotation === undefined) {
135 annotation = ownerDocument.createElement('div'); 136 annotation = ownerDocument.createElement('div');
136 annotations.push(annotation); 137 annotations.push(annotation);
137 holder.appendChild(annotation); 138 holder.appendChild(annotation);