Skip to content

Commit

Permalink
refactor: remove unnecessary check
Browse files Browse the repository at this point in the history
  • Loading branch information
amy-corson-ibigroup committed Jul 18, 2023
1 parent 0f8aea1 commit efcd6ca
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/reducers/create-otp-reducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -734,10 +734,9 @@ function createOtpReducer(config) {
case 'SET_VIEWED_ROUTE':
if (action.payload) {
// If setting to a route, assign the MainPanel according to whether there is a pattern.
const mainPanelValue =
action.payload && action.payload.patternId
? MainPanelContent.PATTERN_VIEWER
: MainPanelContent.ROUTE_VIEWER
const mainPanelValue = action.payload.patternId
? MainPanelContent.PATTERN_VIEWER
: MainPanelContent.ROUTE_VIEWER
return update(state, {
ui: {
mainPanelContent: { $set: mainPanelValue },
Expand Down

0 comments on commit efcd6ca

Please sign in to comment.