Skip to content

Commit

Permalink
Fix #2263 - detailed Flow errors should show the original message
Browse files Browse the repository at this point in the history
  • Loading branch information
w0rp committed Feb 1, 2019
1 parent b315667 commit 0ed3fbc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion ale_linters/javascript/flow.vim
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,8 @@ function! ale_linters#javascript#flow#Handle(buffer, lines) abort
\}

if has_key(l:error, 'extra')
let l:errorToAdd.detail = s:GetDetails(l:error)
let l:errorToAdd.detail = l:errorToAdd.text
\ . "\n" . s:GetDetails(l:error)
endif

call add(l:output, l:errorToAdd)
Expand Down
3 changes: 2 additions & 1 deletion test/handler/test_flow_handler.vader
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,8 @@ Execute(The flow handler should handle extra errors):
\ 'col': 35,
\ 'type': 'E',
\ 'text': 'props of React element `New`: This type is incompatible with object type',
\ 'detail': 'Property `setVector` is incompatible: number This type is incompatible with function type ',
\ 'detail': 'props of React element `New`: This type is incompatible with object type'
\ . "\nProperty `setVector` is incompatible: number This type is incompatible with function type ",
\ }
\]

Expand Down

0 comments on commit 0ed3fbc

Please sign in to comment.