From ea06d4f88e05ab964724e968a145337aa408ecb4 Mon Sep 17 00:00:00 2001 From: RMidhunSuresh Date: Fri, 2 Jul 2021 15:33:04 +0530 Subject: [PATCH] Eliminate double lookup Signed-off-by: RMidhunSuresh --- src/domain/session/rightpanel/disambiguator.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/domain/session/rightpanel/disambiguator.js b/src/domain/session/rightpanel/disambiguator.js index 1ca14703..8be92137 100644 --- a/src/domain/session/rightpanel/disambiguator.js +++ b/src/domain/session/rightpanel/disambiguator.js @@ -31,8 +31,8 @@ export class Disambiguator { _updateMap(vm) { const name = vm.name; - if (this._map.has(name)) { - const value = this._map.get(name); + const value = this._map.get(name); + if (value) { if (Array.isArray(value)) { value.push(vm); } else {