From 7712c822ad9be988d1ab0ee5ed16d99e2b42cf36 Mon Sep 17 00:00:00 2001 From: Jonathan Budzenski Date: Wed, 2 Aug 2017 14:26:33 -0500 Subject: [PATCH] [visualize spy] Check for existence of index before pulling params --- src/core_plugins/spy_modes/public/req_resp_stats_spy_mode.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core_plugins/spy_modes/public/req_resp_stats_spy_mode.js b/src/core_plugins/spy_modes/public/req_resp_stats_spy_mode.js index f25846fb378e4..e4dc09d1ccbfb 100644 --- a/src/core_plugins/spy_modes/public/req_resp_stats_spy_mode.js +++ b/src/core_plugins/spy_modes/public/req_resp_stats_spy_mode.js @@ -19,7 +19,7 @@ const linkReqRespStats = function ($scope) { if (req && req.ms != null) stats.push(['Request Duration', req.ms + 'ms']); if (resp && resp.hits) stats.push(['Hits', resp.hits.total]); - if (req.fetchParams) { + if (req.fetchParams && req.fetchParams.index) { if (req.fetchParams.index.title) stats.push(['Index', req.fetchParams.index.title]); if (req.fetchParams.index.type) stats.push(['Type', req.fetchParams.index.type]); if (req.fetchParams.index.id) stats.push(['Id', req.fetchParams.index.id]);