From 17e36fa5a2535131f3c88a9f4fe16968f3990481 Mon Sep 17 00:00:00 2001 From: Daniel Scalzi Date: Sun, 13 Sep 2020 02:22:24 -0400 Subject: [PATCH] Return after rejection. --- app/assets/js/distromanager.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/assets/js/distromanager.js b/app/assets/js/distromanager.js index a4cafff..90a2ab8 100644 --- a/app/assets/js/distromanager.js +++ b/app/assets/js/distromanager.js @@ -551,17 +551,21 @@ exports.pullRemote = function(){ data = DistroIndex.fromJSON(JSON.parse(body)) } catch (e) { reject(e) + return } fs.writeFile(distroDest, body, 'utf-8', (err) => { if(!err){ resolve(data) + return } else { reject(err) + return } }) } else { reject(error) + return } }) }) @@ -576,8 +580,10 @@ exports.pullLocal = function(){ if(!err){ data = DistroIndex.fromJSON(JSON.parse(d)) resolve(data) + return } else { reject(err) + return } }) })