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:
parent
9c54b2d8d5
commit
670ae111f0
@ -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…
Reference in New Issue
Block a user