Skip to content

Commit

Permalink
Return after rejection.
Browse files Browse the repository at this point in the history
  • Loading branch information
dscalzi committed Sep 13, 2020
1 parent 2156099 commit 17e36fa
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/assets/js/distromanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
})
})
Expand All @@ -576,8 +580,10 @@ exports.pullLocal = function(){
if(!err){
data = DistroIndex.fromJSON(JSON.parse(d))
resolve(data)
return
} else {
reject(err)
return
}
})
})
Expand Down

0 comments on commit 17e36fa

Please sign in to comment.