Check prev name is string

Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
This commit is contained in:
RMidhunSuresh 2021-07-02 16:00:38 +05:30
parent 11d411c9a9
commit 53fc6a7af9

View file

@ -19,7 +19,7 @@ export class Disambiguator {
_handlePreviousName(vm) {
const previousName = vm.previousName;
if (!previousName) { return; }
if (typeof previousName !== "string") { return; }
const value = this._map.get(previousName);
if (Array.isArray(value)) {
this._unDisambiguate(vm, value);