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 } }) })