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 issue with mixed up variables #167

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lincolnanders5
Copy link

The console.log() on line 247 printed out result, but result had not been declared locally inside the function. The callback function took in err, res of which res never got used in the function body. The logged result was then accessing the global variable result defined on line 242.
I was going to change the console.log(result.toString("hex")) to console.log(res.toString("hex")), but the other examples use result so I changed the parameter to be consistent with the rest of the examples.

The console.log printed out `result`, but `result` had not been declared locally inside the function. The callback function took in `err, res` of which `res` never got used in the function body. The logged `result` was then accessing the global variable `result` defined on line 242.
I was going to change the `console.log(result.toString("hex"))` to  `console.log(res.toString("hex"))`, but the other examples use `result` so I changed the parameter to be consistent with the rest of the examples.
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.

1 participant