Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Commit

Permalink
fix: only try to get ipfs if argv is present (#2504)
Browse files Browse the repository at this point in the history
Sometimes you've done something silly like required a module that isn't installed or called a method that isn't a property of an object in which case `argv` won't have a value, causing an unrelated error to appear.

This PR just makes sure `argv` has a value before trying to access `argv.getIpfs`
  • Loading branch information
achingbrain authored Oct 3, 2019
1 parent 60064b6 commit 1281b9f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cli/bin.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ cli
}
})
.catch(({ error, argv }) => {
getIpfs = argv.getIpfs
getIpfs = argv && argv.getIpfs
if (error.message) {
print(error.message)
debug(error)
Expand Down

0 comments on commit 1281b9f

Please sign in to comment.