Skip to content

Conversation

@bennycode
Copy link
Contributor

I was testing client.ws.depth and noticed that the close handle doesn't work because the cache assignment is done with a forEach execution.

I fixed it by using map (all other cache assignments are also done with map).

This prevents the following error:

TypeError: Cannot read property 'forEach' of undefined

You can test it with the following snippet:

const close = client.ws.depth('ETHBTC', depth => {
  console.log('new data', depth);
  close();
})

@coveralls
Copy link

coveralls commented Feb 24, 2018

Coverage Status

Coverage decreased (-23.7%) to 69.565% when pulling bf91f08 on bennyn:patch-1 into a02d541 on HyperCubeProject:master.

@balthazar balthazar added the bug label Feb 24, 2018
@balthazar
Copy link
Collaborator

Nice, thanks

@balthazar balthazar merged commit 6655aae into ccxt:master Feb 24, 2018
@bennycode bennycode deleted the patch-1 branch February 24, 2018 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants