Eliminate double lookup

Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
This commit is contained in:
RMidhunSuresh 2021-07-02 15:33:04 +05:30
parent da1e981948
commit ea06d4f88e

View File

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