private getRegisteredObject()

in src/XDM.ts [317:332]


    private getRegisteredObject(instanceId: string, instanceContext?: Object): Object | undefined {

        if (instanceId === "__proxyFunctions") {
            // Special case for proxied functions of remote instances
            return this.proxyFunctions;
        }

        // Look in the channel registry first
        var registeredObject = this.registry.getInstance(instanceId, instanceContext);
        if (!registeredObject) {
            // Look in the global registry as a fallback
            registeredObject = globalObjectRegistry.getInstance(instanceId, instanceContext);
        }

        return registeredObject;
    }