Throw custom error when remote object is missing from registry
This commit is contained in:
parent
1b5b29901c
commit
c05ca68811
2 changed files with 33 additions and 2 deletions
|
@ -41,7 +41,8 @@ class ObjectsRegistry {
|
|||
|
||||
// Get an object according to its ID.
|
||||
get (id) {
|
||||
return this.storage[id].object
|
||||
const pointer = this.storage[id]
|
||||
if (pointer != null) return pointer.object
|
||||
}
|
||||
|
||||
// Dereference an object according to its ID.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue