Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
Merge pull request #13503 from NejcZdovc/hotfix/#13330-bad-state
Browse files Browse the repository at this point in the history
Fixes bad state
  • Loading branch information
bsclifton committed Mar 19, 2018
1 parent 47bce70 commit 25186e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/browser/api/ledger.js
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ const getPublisherData = (result, scorekeeper) => {
minutesSpent: 0,
secondsSpent: 0,
faviconURL: result.faviconURL,
score: result.scores[scorekeeper],
score: result.scores ? result.scores[scorekeeper] : 0,
pinPercentage: result.pinPercentage,
weight: result.pinPercentage
}
Expand Down Expand Up @@ -437,7 +437,7 @@ const synopsisNormalizer = (state, changedPublisher, returnState = true, prune =
dataPinned.push(getPublisherData(publisher, scorekeeper))
} else if (ledgerUtil.stickyP(state, publisher.publisherKey)) {
// unpinned
unPinnedTotal += publisher.scores[scorekeeper]
unPinnedTotal += publisher.scores ? publisher.scores[scorekeeper] : 0
dataUnPinned.push(publisher)
} else {
// excluded
Expand Down

0 comments on commit 25186e1

Please sign in to comment.