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

Commit

Permalink
Prevent trying to access undefined if networks is not provided
Browse files Browse the repository at this point in the history
  • Loading branch information
eggplantzzz committed Oct 31, 2019
1 parent 5a0be44 commit d404911
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/provider/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ module.exports = {
testConnection: function(options) {
let networkCheckTimeout, networkType;
const { networks, network } = options;
if (networks[network]) {
if (networks && networks[network]) {
networkCheckTimeout =
networks[network].networkCheckTimeout || DEFAULT_NETWORK_CHECK_TIMEOUT;
networkType = networks[network].type;
Expand Down

0 comments on commit d404911

Please sign in to comment.