Skip to content

Commit

Permalink
Merge pull request brave#9509 from brave/issue-9508
Browse files Browse the repository at this point in the history
Issue 9508
  • Loading branch information
bsclifton authored Jun 20, 2017
2 parents c43bfa4 + c1effd9 commit 1a75d4d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/browser/tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ const api = {
let tabId = tab.getId()

tab.on('did-start-navigation', (e, navigationHandle) => {
if (navigationHandle.isValid() && navigationHandle.isInMainFrame()) {
if (!tab.isDestroyed() && navigationHandle.isValid() && navigationHandle.isInMainFrame()) {
const controller = tab.controller()
if (!controller.isValid()) {
return
Expand All @@ -448,7 +448,7 @@ const api = {
})

tab.on('did-finish-navigation', (e, navigationHandle) => {
if (navigationHandle.isValid() && navigationHandle.isInMainFrame()) {
if (!tab.isDestroyed() && navigationHandle.isValid() && navigationHandle.isInMainFrame()) {
const controller = tab.controller()
if (!controller.isValid()) {
return
Expand Down
2 changes: 1 addition & 1 deletion js/state/frameStateUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ function getTotalBlocks (frame) {
function isPinned (state, frameKey) {
const frame = getFrameByKey(state, frameKey)

return !!frame.get('pinnedLocation')
return frame && !!frame.get('pinnedLocation')
}

/**
Expand Down

0 comments on commit 1a75d4d

Please sign in to comment.