Skip to content

Conversation

@ocke
Copy link
Contributor

@ocke ocke commented Aug 7, 2019

Only have 1 client. Return the client if we already had one.

https://zendesk.atlassian.net/browse/AF-1697

@sostopher sostopher changed the title Only have 1 client [AF-1697] Only have 1 client Aug 7, 2019
let _client
const ZAFClient = {
init: function (callback, loc) {
if (_client) return _client
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this change, we would always return the same client regardless of different callback or loc being passed, which doesn't look right to me. I've seen apps creating multiple clients in the past during app review process, not entirely sure about their use case but I think this would be a risky change if we suddenly remove this capability.

@sarmadsangi
Copy link
Contributor

Closing this, since we don't have immediate plans do make this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants