Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calling any method with onBehalfOf mutates the original object passed in #53

Open
mattpocock opened this issue Nov 24, 2020 · 1 comment
Assignees

Comments

@mattpocock
Copy link

Imagine a test file with the following:

const args = { id: 'account-id' }

await currencyCloud.onBehalfOf('contact-id', () => {
  return currencyCloud.accounts.get(args);
});

expect(args.onBehalfOf).toEqual('contact-id');

Ran into this during development, so forked currency-cloud to avoid it.

@jonathancouchman
Copy link
Contributor

@mattpocock thanks for raising this. Feel free to link you forked repo so that we can see what you have done.

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

No branches or pull requests

2 participants