Fix friends making

pull/10/head
Chocobozzz 2016-05-13 15:02:51 +02:00
parent 5109ee6148
commit d6ea0175cb
1 changed files with 4 additions and 2 deletions

View File

@ -156,10 +156,12 @@ function computeWinningPods (urls, podsScore) {
// Only add a pod if it exists in more than a half base pods
const podsList = []
const baseScore = urls.length / 2
Object.keys(baseScore).forEach(function (pod) {
Object.keys(podsScore).forEach(function (pod) {
if (podsScore[pod] > baseScore) podsList.push({ url: pod })
})
console.log(urls)
console.log(podsScore)
console.log(podsList)
return podsList
}