diff --git a/ui/src/shared/components/SourceIndicator.tsx b/ui/src/shared/components/SourceIndicator.tsx index f35abf5183..13af7cd09c 100644 --- a/ui/src/shared/components/SourceIndicator.tsx +++ b/ui/src/shared/components/SourceIndicator.tsx @@ -11,16 +11,19 @@ interface Props { sourceOverride?: Source } -const SourceIndicator: SFC = ( - {sourceOverride}, - {source: {name, url}} -) => { +const SourceIndicator: SFC = ({sourceOverride}, {source}) => { + if (!source) { + return null + } + + const {name, url} = source const sourceName: string = _.get(sourceOverride, 'name', name) const sourceUrl: string = _.get(sourceOverride, 'url', url) + const sourceNameTooltip: string = `

Connected to Source:

${sourceName} @ ${sourceUrl}

` const uuidTooltip: string = uuid.v4() - return sourceName ? ( + return (
= ( class="influx-tooltip" />
- ) : null + ) } const {shape} = PropTypes