Throw custom error when remote object is missing from registry

This commit is contained in:
Kevin Sawicki 2016-11-17 09:55:13 -08:00
parent 1b5b29901c
commit c05ca68811
2 changed files with 33 additions and 2 deletions

View file

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