Skip to content

Commit

Permalink
Fixes merge problem
Browse files Browse the repository at this point in the history
  • Loading branch information
NejcZdovc committed Dec 5, 2018
1 parent 2b4a126 commit e892938
Showing 1 changed file with 11 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,17 @@ const publishersReducer: Reducer<Rewards.State | undefined> = (state: Rewards.St

state.numExcludedSites = parseInt(newNum, 10)

if (previousNum < newNum) {
// On a new excluded publisher, add to excluded state
if (!state.excluded.includes(publisherKey)) {
state.excluded.push(publisherKey)
}
} else {
// Remove the publisher from excluded if it has been re-included
if (state.excluded.includes(publisherKey)) {
state.excluded = state.excluded.filter((key: string) => key !== publisherKey)
if (publisherKey.length > 0) {
if (previousNum < newNum) {
// On a new excluded publisher, add to excluded state
if (!state.excluded.includes(publisherKey)) {
state.excluded.push(publisherKey)
}
} else {
// Remove the publisher from excluded if it has been re-included
if (state.excluded.includes(publisherKey)) {
state.excluded = state.excluded.filter((key: string) => key !== publisherKey)
}
}
}

Expand Down

0 comments on commit e892938

Please sign in to comment.