Skip to content

Commit

Permalink
prebid#1892 Use filter instead ...new Set to get unique values
Browse files Browse the repository at this point in the history
  • Loading branch information
mkalafior committed Nov 29, 2017
1 parent ec7a578 commit 291938e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions modules/justpremiumBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ export const spec = {
const c = preparePubCond(validBidRequests)
const dim = getWebsiteDim()
const payload = {
zone: [...new Set(validBidRequests.map(b => {
zone: validBidRequests.map(b => {
return parseInt(b.params.zone)
}))].join(','),
}).filter((value, index, self) => {
return self.indexOf(value) === index
}),
hostname: getTopWindowLocation().hostname,
protocol: getTopWindowLocation().protocol.replace(':', ''),
sw: dim.screenWidth,
Expand Down

0 comments on commit 291938e

Please sign in to comment.