From 53a5b54b99d56be03c93821fd55e3d3630220fe5 Mon Sep 17 00:00:00 2001 From: Kenia <19161242+kaxcode@users.noreply.github.com> Date: Wed, 18 Nov 2020 14:01:35 -0500 Subject: [PATCH] ui: Fix mutated nspace argument (#9222) --- .../app/components/topology-metrics/stats/index.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ui/packages/consul-ui/app/components/topology-metrics/stats/index.js b/ui/packages/consul-ui/app/components/topology-metrics/stats/index.js index 3a7738dd4f..cacaf60017 100644 --- a/ui/packages/consul-ui/app/components/topology-metrics/stats/index.js +++ b/ui/packages/consul-ui/app/components/topology-metrics/stats/index.js @@ -14,10 +14,11 @@ export default class TopologyMetricsStats extends Component { } else { // For up/downstreams we need to pull out the stats for the service we // represent. - if ((this.args.nspace || '').length === 0) { - this.args.nspace = 'default'; + let nspace = this.args.nspace || ''; + if (nspace.length === 0) { + nspace = 'default'; } - let entity = `${this.args.item}.${this.args.nspace}.${this.args.dc}`; + let entity = `${this.args.item}.${nspace}.${this.args.dc}`; this.stats = event.data.stats[entity]; } // Limit to 4 metrics for now.