From c4e77a0f19804c94bc21c6d90dd3c49a37d4d5cb Mon Sep 17 00:00:00 2001 From: Alystrasz Date: Sat, 6 Aug 2022 22:46:41 +0200 Subject: feat: getLatestNsVersion returns false if no Internet --- src/extras/requests.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') 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 ); }); } }); -- cgit v1.2.3