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 #10124 from brave/10122
Browse files Browse the repository at this point in the history
Check tags before using them
  • Loading branch information
bsclifton committed Jul 31, 2017
1 parent f82239a commit 102d65d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions app/browser/windows.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,14 @@ const updatePinnedTabs = (win) => {
const appStore = require('../../js/stores/appStore')
const state = appStore.getState()
const windowId = win.id
const pinnedSites = state.get('sites').toList().filter((site) =>
site.get('tags').includes(siteTags.PINNED)).map(site => getPinnedSiteProps(site))
const pinnedSites = state.get('sites').toList().filter((site) => {
const tags = site.get('tags')
if (!tags) {
return false
}
return tags.includes(siteTags.PINNED)
})
.map(site => getPinnedSiteProps(site))
const pinnedTabs = getPinnedTabsByWindowId(state, windowId)

pinnedSites.filter((site) =>
Expand Down

0 comments on commit 102d65d

Please sign in to comment.