Skip to content

Commit 42992af

Browse files
committed
Safely check for optional dict value
1 parent fbca4ee commit 42992af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

autoload/OmniSharp/actions/test.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function! s:CBRunTest(summary) abort
2222
if a:summary.pass
2323
if len(a:summary.locations) == 0
2424
echomsg 'No tests were run'
25-
elseif a:summary.locations[0].type ==# 'W'
25+
elseif get(a:summary.locations[0], 'type', '') ==# 'W'
2626
echohl WarningMsg
2727
echomsg a:summary.locations[0].name . ': skipped'
2828
echohl None

0 commit comments

Comments
 (0)