diff --git a/lib/active-client.js b/lib/active-client.js index d1eb889..326a6fb 100644 --- a/lib/active-client.js +++ b/lib/active-client.js @@ -13,13 +13,13 @@ class ActiveClient { const client = clients && clients.length === 1 ? clients[0] : false; if(client) - client.getInstance = this.getInstance(client); + this.inject(client); return client; } - static getInstance(client) { - return TheClass => { + static inject(client) { + client.getInstance = TheClass => { const instance = new TheClass(); instance.client = client;