1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

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`.
This commit is contained in:
Mark Stacey 2020-07-10 12:46:54 -03:00 committed by GitHub
parent 9c54b2d8d5
commit 670ae111f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

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

View File

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