From 97dd4f8f82760ce106ae910bee5324f57443bc74 Mon Sep 17 00:00:00 2001 From: Brandon Farmer Date: Fri, 18 May 2018 09:29:14 -0700 Subject: [PATCH] Check for query text in CustomTimeIndicator --- ui/src/shared/components/CustomTimeIndicator.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/src/shared/components/CustomTimeIndicator.tsx b/ui/src/shared/components/CustomTimeIndicator.tsx index 9b40dc3cd0..34d1d942d6 100644 --- a/ui/src/shared/components/CustomTimeIndicator.tsx +++ b/ui/src/shared/components/CustomTimeIndicator.tsx @@ -15,7 +15,8 @@ interface Props { const CustomTimeIndicator: SFC = ({queries}) => { const q = queries.find( - query => query.text.includes(TEMP_VAR_DASHBOARD_TIME) === false + query => + _.get(query, 'text', '').includes(TEMP_VAR_DASHBOARD_TIME) === false ) const customLower = _.get(q, ['queryConfig', 'range', 'lower'], null) const customUpper = _.get(q, ['queryConfig', 'range', 'upper'], null)