ui: Fix mutated nspace argument (#9222)

This commit is contained in:
Kenia 2020-11-18 14:01:35 -05:00 committed by GitHub
parent fc07c63974
commit a36c09a95a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -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.