diff options
author | Alystrasz <contact@remyraes.com> | 2022-08-06 22:46:41 +0200 |
---|---|---|
committer | Alystrasz <contact@remyraes.com> | 2022-08-06 22:46:41 +0200 |
commit | c4e77a0f19804c94bc21c6d90dd3c49a37d4d5cb (patch) | |
tree | 3e87472e0977d6c0226216f8771da14de6515519 /src/extras | |
parent | 944363c06995196f68a57997973b11eac93d7d59 (diff) | |
download | Viper-c4e77a0f19804c94bc21c6d90dd3c49a37d4d5cb.tar.gz Viper-c4e77a0f19804c94bc21c6d90dd3c49a37d4d5cb.zip |
feat: getLatestNsVersion returns false if no Internet
Diffstat (limited to 'src/extras')
-rw-r--r-- | src/extras/requests.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/extras/requests.js b/src/extras/requests.js index c609da3..6066e90 100644 --- a/src/extras/requests.js +++ b/src/extras/requests.js @@ -58,6 +58,11 @@ async function getLatestNsVersion() { _saveCache(cache); resolve( cache[NORTHSTAR_LATEST_RELEASE_KEY]["body"]["tag_name"] ); }); + }) + + .on('error', () => { + console.error('Failed to get latest Northstar version.'); + resolve( false ); }); } }); |