Skip to content

Commit d14fe94

Browse files
author
Emil Andersson
committed
access line and column of position in a type safe way
1 parent 01ebbcb commit d14fe94

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/browser/modules/Editor/Monaco.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,8 @@ const Monaco = forwardRef<MonacoHandles, MonacoProps>(
459459
...editor.getModelMarkers({ owner: monacoId }),
460460
...response.result.summary.notifications.map(
461461
({ description, position, title }) => {
462-
const { line, column } = position as NotificationPosition
462+
const line = 'line' in position ? position.line : 0
463+
const column = 'column' in position ? position.column : 0
463464
return {
464465
startLineNumber: statementLineNumber + line,
465466
startColumn:

0 commit comments

Comments
 (0)