Apply suggestion to src/services/follow_manipulate/follow_manipulate.js

This commit is contained in:
rinpatch 2019-08-09 12:26:58 +00:00
parent 5f3ac6625f
commit 114b5f6eff

View File

@ -6,7 +6,7 @@ const fetchUser = (attempt, user, store) => new Promise((resolve, reject) => {
.catch((e) => reject(e)) .catch((e) => reject(e))
}, 500) }, 500)
}).then(([following, sent, locked, attempt]) => { }).then(([following, sent, locked, attempt]) => {
if (!following && !locked && attempt <= 3) { if (!following && !(locked && sent) && attempt <= 3) {
// If we BE reports that we still not following that user - retry, // If we BE reports that we still not following that user - retry,
// increment attempts by one // increment attempts by one
return fetchUser(++attempt, user, store) return fetchUser(++attempt, user, store)