[FIX] Cannot read property 'debug' of undefined when trying to use REST API #10805
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #10581 (I don't know why it was closed)
I am not sure why
logger
was defined twice - once as an instance outside of the class and once as a field of the class usingthis
. This PR cleans this up a little by removing the latter. I believe it is obvious whythis.logger
is undefined since it is called inside offunction _internalRouteActionHandler() { ... }
which creates a new scope wherethis
is something else.To be honest - and I am very sorry for that - I did not test this but I tried for two hours to get Rocket.Chat running on my machine to no avail (and I am no JS noob), neither the develop branch nor any of the recent releases, different errors all over the place. I followed the developer section in the Readme.
Also the test suit
npm run test
doesn't work, so I am really sorry for that.What I don't understand is why this has not been crashing for everyone?!?!
Edit: I was able to test this now 👍