Skip to content
This repository has been archived by the owner on Jul 9, 2021. It is now read-only.

Bug: Calling _blockAndLogStreamer method when it's undefined #260

Closed
fabioberger opened this issue Dec 9, 2017 · 1 comment
Closed

Bug: Calling _blockAndLogStreamer method when it's undefined #260

fabioberger opened this issue Dec 9, 2017 · 1 comment
Assignees

Comments

@fabioberger
Copy link
Contributor

In 0x Portal, I intermittently receive the following error originating from 0x.js:

Cannot read property 'unsubscribeFromOnLogAdded' of undefined

From this line:
https://github.com/0xProject/0x.js/blob/development/packages/0x.js/src/contract_wrappers/contract_wrapper.ts#L168

Inspecting the code, it seems that _blockAndLogStreamer should actually be called _blockAndLogStreamerIfExists since it can be undefined. Further, we should check whether it exists before calling methods on it.

It would also be good to figure out why _stopBlockAndLogStream is being called multiple times.

@fabioberger
Copy link
Contributor Author

Fixed in #262

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

No branches or pull requests

2 participants