Merge pull request #18062 from influxdata/inc_5ebaf007

fix: add default value for "settings"
pull/18065/head
Michael Desa 2020-05-12 12:43:56 -07:00 committed by GitHub
commit 930aa4321c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 10 deletions

View File

@ -2,6 +2,7 @@
import React, {FC} from 'react'
import {Link} from 'react-router'
import {connect} from 'react-redux'
import {get} from 'lodash'
// Components
import CloudOnly from 'src/shared/components/cloud/CloudOnly'
@ -36,11 +37,8 @@ const CloudUpgradeButton: FC<StateProps> = ({inView}) => {
)
}
const mstp = ({
cloud: {
orgSettings: {settings},
},
}: AppState) => {
const mstp = (state: AppState) => {
const settings = get(state, 'cloud.orgSettings.settings', [])
const hideUpgradeButtonSetting = settings.find(
(setting: OrgSetting) => setting.key === HIDE_UPGRADE_CTA_KEY
)

View File

@ -2,6 +2,7 @@
import React, {FC} from 'react'
import {Link} from 'react-router'
import {connect} from 'react-redux'
import {get} from 'lodash'
// Components
import {
@ -71,11 +72,8 @@ const CloudUpgradeNavBanner: FC<StateProps> = ({inView}) => {
)
}
const mstp = ({
cloud: {
orgSettings: {settings},
},
}: AppState) => {
const mstp = (state: AppState) => {
const settings = get(state, 'cloud.orgSettings.settings', [])
const hideUpgradeButtonSetting = settings.find(
(setting: OrgSetting) => setting.key === HIDE_UPGRADE_CTA_KEY
)