Skip to content

Commit

Permalink
Merge pull request #431 from wytlytningNZ/patch-1
Browse files Browse the repository at this point in the history
Enable live-reload emulator builds to work without a network connection
  • Loading branch information
alexblom authored Dec 6, 2017
2 parents 2a00a2f + 2c5c01f commit 80b22b3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/utils/get-network-ip.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,8 @@ module.exports = function getNetworkIp() {
}
}

return addresses[0];
// Default to 'localhost' when a suitable IP address isn't found.
// This will allow live-reload emulators builds to function when
// working without a network connection.
return addresses[0] || 'localhost';
};

0 comments on commit 80b22b3

Please sign in to comment.