Closed jmatthewpryor closed 7 years ago
Nice catch. A fix should be straightforward. I'll keep an eye out for a PR or take care of it Monday, whichever comes first :)
Version 1.3.1 has a fix for this issue, as well as a second condition I've observed wherein multiple organizations have the same domain. So, now the method will only return an array non-empty unique strings or null.
https://github.com/delivered/chargify-zendesk/releases/tag/1.3.1
Hi
We have a lot of customers who don't have a domain set up in their organization, and as a result the app ends up pulling in 20 extra customers using the query
https://obsrv.chargify.com/customers.json?q=@
This is the code that causes it (I think)
I think the issue is that organizationDomains is an array with one empty string in it. So the app ends up issuing the following query https://obsrv.chargify.com/customers.json?q=@ Which returns 20 customers that are not related to the user currently being viewed
I can likely work up a pull request if needed, but I think the fix is simple; getCustomerOrganizationDomains() should refuse to return any empty string elements
Thanks