Remove unnecessary optional chaining operator (#8892)

`state.activeTab` is always guaranteed to be set to an object before
the UI is initialized. This happens in `app/ui.js`.
feature/default_network_editable
Mark Stacey 4 years ago committed by GitHub
parent 9c54b2d8d5
commit 670ae111f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      ui/app/components/app/menu-bar/tests/menu-bar.test.js
  2. 2
      ui/app/selectors/selectors.js

@ -6,6 +6,7 @@ import { mountWithRouter } from '../../../../../../test/lib/render-helpers'
import MenuBar from '../index'
const initState = {
activeTab: {},
metamask: {
network: '1',
selectedAddress: '0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc',

@ -321,7 +321,7 @@ export function getFeatureFlags (state) {
}
export function getOriginOfCurrentTab (state) {
return state.activeTab?.origin
return state.activeTab.origin
}
export function getIpfsGateway (state) {

Loading…
Cancel
Save