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

Fixed bug "TypeError: Cannot read property 'forEach' of null" #20

Merged
merged 2 commits into from
Sep 1, 2017
Merged

Fixed bug "TypeError: Cannot read property 'forEach' of null" #20

merged 2 commits into from
Sep 1, 2017

Conversation

danielnovy
Copy link
Contributor

I was getting the error below when clicking on a transaction hash. A simple check to certify that traces is not null solved the problem.

/home/dnovy/etherchain-light/routes/tx.js:125
    traces.forEach(function(trace) {
          ^
TypeError: Cannot read property 'forEach' of null
    at /home/dnovy/etherchain-light/routes/tx.js:125:11
    at /home/dnovy/etherchain-light/node_modules/async/dist/async.js:421:16
    at next (/home/dnovy/etherchain-light/node_modules/async/dist/async.js:5302:29)
    at /home/dnovy/etherchain-light/node_modules/async/dist/async.js:906:16
    at /home/dnovy/etherchain-light/routes/tx.js:78:9
    at dispatchError (/home/dnovy/etherchain-light/node_modules/levelup/lib/util.js:22:36)
    at /home/dnovy/etherchain-light/node_modules/levelup/lib/levelup.js:203:14

@peterbitfly
Copy link
Collaborator

Thanks for your PR. It looks good to me and can be merged. Do you know why not trace was available for the transaction? This could happen if you start parity without the --tracing=on flag.

@peterbitfly peterbitfly merged commit 6d015d1 into gobitfly:master Sep 1, 2017
@danielnovy
Copy link
Contributor Author

This could happen if you start parity without the --tracing=on flag

Oh, gotcha! That's probably the reason, I'm not using that flag.

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.

2 participants