Eliminate double lookup
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
This commit is contained in:
parent
da1e981948
commit
ea06d4f88e
1 changed files with 2 additions and 2 deletions
|
@ -31,8 +31,8 @@ export class Disambiguator {
|
||||||
|
|
||||||
_updateMap(vm) {
|
_updateMap(vm) {
|
||||||
const name = vm.name;
|
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)) {
|
if (Array.isArray(value)) {
|
||||||
value.push(vm);
|
value.push(vm);
|
||||||
} else {
|
} else {
|
||||||
|
|
Reference in a new issue