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<Props> = ({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)