Skip to content

Commit

Permalink
technically contracts and sources fields are also optional, if there …
Browse files Browse the repository at this point in the history
…are no errors or sources attached due to no valid output produced at all
  • Loading branch information
iostat committed Sep 13, 2019
1 parent b4adb02 commit 2788dda
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Language/Solidity/Compiler/Types/Output.purs
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,6 @@ instance decodeJsonCompilerOutput :: DecodeJson CompilerOutput where
decodeJson j = do
o <- decodeJson j
errors <- o .:? "errors" .!= []
sources <- o .: "sources"
contracts <- o .: "contracts"
sources <- o .:? "sources" .!= FO.empty
contracts <- o .:? "contracts" .!= FO.empty
pure $ CompilerOutput { errors, sources, contracts }

0 comments on commit 2788dda

Please sign in to comment.