Skip to content

Commit ccec1ae

Browse files
Fix uptrace error e.dataset is undefined (#10251)
Signed-off-by: Artem Savchenko <[email protected]>
1 parent 4b10759 commit ccec1ae

File tree

1 file changed

+1
-1
lines changed
  • plugins/text-editor-resources/src/components/extension/toolbar

1 file changed

+1
-1
lines changed

plugins/text-editor-resources/src/components/extension/toolbar/toolbar.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ function resolveCursorPositionFromCoords (view: EditorView, coords: { left: numb
636636

637637
function scanMarker (target: HTMLElement | null, field: string): [boolean, HTMLElement | null] {
638638
while (target != null) {
639-
if (target.dataset[field] === 'true') {
639+
if (target.dataset?.[field] === 'true') {
640640
return [true, target]
641641
}
642642
target = target.parentElement

0 commit comments

Comments
 (0)