nmarus / node-ews

A simple JSON wrapper for the Exchange Web Services (EWS) SOAP API.
MIT License
116 stars 52 forks source link

initFiles doesn't set tempDir if ifDirExists fails #29

Closed aderbedr closed 8 years ago

aderbedr commented 8 years ago

If ifDirExists fails and it gets to the catch block, "this" is undefined, which then it goes to set tempDir of undefined and fails. You cannot access "this" inside a promise block to my knowledge.

nmarus commented 8 years ago

Glanced at code. The usage if "this" when using arrow functions changes the behavior of "this" and is no longer relative to the interior block. Will test to see where issue may be and get back.

nmarus commented 8 years ago

I have a fix implemented/tested. Patch incoming.

nmarus commented 8 years ago

Resolved in version v3.0.0