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 2d03f76ea966f..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,10 +19,10 @@ 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.index) stats.push(['Index', req.fetchParams.index]); - if (req.fetchParams.type) stats.push(['Type', req.fetchParams.type]); - if (req.fetchParams.id) stats.push(['Id', req.fetchParams.id]); + 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]); } }); };