Skip to content

Commit 2f50ec9

Browse files
committed
Fix sentry reported bug
1 parent ae0aae4 commit 2f50ec9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

static/js/editors.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ function makeMarker( msg ) {
7373

7474
function setErrorMarker( editor, error ) {
7575
var loc = error.loc;
76+
if (!loc || typeof loc.offset !== 'function') {
77+
return;
78+
}
7679
var offset = error.loc.offset();
7780
var mark = editor.markText(
7881
{line: loc.line-1,ch:loc.column},

0 commit comments

Comments
 (0)