The PR #15 introduces an error sincethis.loadedTypes[object._t] can be undefined in certain cases.
This is because this.loadedTypes[object._t] is initialized only if the object this.objects[object._i] doesn't exists.
This PR moves the check
if (!this.loadedTypes[object._t]) {
this.loadedTypes[object._t] = {}
}
The PR #15 introduces an error since
this.loadedTypes[object._t]
can beundefined
in certain cases. This is becausethis.loadedTypes[object._t]
is initialized only if the objectthis.objects[object._i]
doesn't exists.This PR moves the check
outside the main
if
, so it's always checked.