Skip to content

Commit

Permalink
Merge pull request brave#10583 from brave/issue-10182
Browse files Browse the repository at this point in the history
fix handling of navigable vs non-navigable about pages from menu
  • Loading branch information
bbondy authored Aug 23, 2017
2 parents 99dfe19 + 1f23b13 commit 12cd539
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/browser/reducers/tabsReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const getSetting = require('../../../js/settings').getSetting
const settings = require('../../../js/constants/settings')
const {tabCloseAction} = require('../../common/constants/settingsEnums')
const {frameOptsFromFrame} = require('../../../js/state/frameStateUtil')
const {isSourceAboutUrl, isTargetAboutUrl, isIntermediateAboutPage} = require('../../../js/lib/appUrlUtil')
const {isSourceAboutUrl, isTargetAboutUrl, isNavigatableAboutPage} = require('../../../js/lib/appUrlUtil')

const updateActiveTab = (state, closeTabId) => {
if (!tabState.getByTabId(state, closeTabId)) {
Expand Down Expand Up @@ -149,7 +149,7 @@ const tabsReducer = (state, action, immutableAction) => {
const url = action.getIn(['createProperties', 'url'])
setImmediate(() => {
if (action.get('activateIfOpen') ||
((isSourceAboutUrl(url) || isTargetAboutUrl(url)) && !isIntermediateAboutPage(url))) {
((isSourceAboutUrl(url) || isTargetAboutUrl(url)) && isNavigatableAboutPage(url))) {
tabs.maybeCreateTab(state, action.get('createProperties'))
} else {
tabs.create(action.get('createProperties'), null, action.get('isRestore'))
Expand Down
3 changes: 1 addition & 2 deletions app/common/commonMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

const appActions = require('../../js/actions/appActions')
const messages = require('../../js/constants/messages')
const Immutable = require('immutable')
const locale = require('../../js/l10n')
const settings = require('../../js/constants/settings')
const {tabs} = require('../../js/constants/config')
Expand All @@ -25,7 +24,7 @@ if (process.type === 'browser') {
const ensureAtLeastOneWindow = (frameOpts = {}) => {
if (process.type === 'browser') {
if (BrowserWindow.getAllWindows().length === 0) {
appActions.newWindow(Immutable.fromJS({location: frameOpts.url}))
appActions.newWindow(frameOpts)
return
}
}
Expand Down

0 comments on commit 12cd539

Please sign in to comment.