mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 19:45:05 +01:00
Eliminate double lookup
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
This commit is contained in:
parent
da1e981948
commit
ea06d4f88e
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user