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

Commit

Permalink
Fix broken reference to tab action constant
Browse files Browse the repository at this point in the history
Fixes #11796

Auditors: @petemill, @NejcZdovc
  • Loading branch information
bsclifton authored and petemill committed Dec 23, 2017
1 parent 494cf4e commit 6b290b8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/renderer/reducers/urlBarReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ const {navigateSiteClickHandler} = require('../suggestionClickHandlers')
const navigationBarState = require('../../common/state/navigationBarState')
const tabState = require('../../common/state/tabState')
const {normalizeLocation} = require('../../common/lib/suggestion')
const tabActions = require('../../common/actions/tabActions')
const { getSetting } = require('../../../js/settings')
const settings = require('../../../js/constants/settings')
const tabActionConsts = require('../../common/constants/tabAction')

const updateSearchEngineInfoFromInput = (state, frameProps) => {
const input = frameProps.getIn(['navbar', 'urlbar', 'location'])
Expand Down Expand Up @@ -192,7 +192,7 @@ const setUrlBarSelected = (state, selected) => {

const urlBarReducer = (state, action) => {
// TODO(bridiver) - this is a workaround until we can migrate frames to tabs
if (action.actionType === tabActions.didFinishNavigation.name) {
if (action.actionType === tabActionConsts.FINISH_NAVIGATION) {
const tabId = action.tabId
const navigationState = action.navigationState

Expand Down
3 changes: 2 additions & 1 deletion test/unit/app/renderer/reducers/urlBarReducerTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const windowConstants = require('../../../../../js/constants/windowConstants')
const appConstants = require('../../../../../js/constants/appConstants')
const settings = require('../../../../../js/constants/settings')
const tabActions = require('../../../../../app/common/actions/tabActions')
const tabActionConsts = require('../../../../../app/common/constants/tabAction')

require('../../../braveUnit')

Expand Down Expand Up @@ -134,7 +135,7 @@ describe('urlBarReducer', function () {

describe('tabActions.didFinishNavigation', function () {
before(function () {
this.newState = urlBarReducer(windowState, {actionType: tabActions.didFinishNavigation.name,
this.newState = urlBarReducer(windowState, {actionType: tabActionConsts.FINISH_NAVIGATION,
tabId: 2,
navigationState: Immutable.fromJS({
visibleEntry: {
Expand Down

0 comments on commit 6b290b8

Please sign in to comment.