Feature/8 return a promise #5

Merged
Vylpes merged 7 commits from feature/8-return-a-promise into develop 2021-04-12 20:22:57 +01:00
Showing only changes of commit bfa56d657c - Show all commits

View file

@ -59,7 +59,7 @@ function randomBunny(subreddit, sortBy, cb) {
}
function promise(subreddit, sortBy) {
return new Promise((resolve) => {
return new Promise(resolve => {
// If the sortable list doesn't include sortBy, default to 'hot'
if (!sortable.includes(sortBy)) sortBy = 'hot';