SeVeNDuS / node-onesignal-api

OneSignal's unofficial node.js client library for using OneSignal Rest API.
MIT License
50 stars 11 forks source link

Fixed ReferenceError on NodeJS v6.4.0 #8

Closed voliva closed 8 years ago

voliva commented 8 years ago

In my environment, using node-onesignal-api would throw a ReferenceError message:

ReferenceError: callback is not defined
    at Client.request (node_modules/node-opensignal-api/lib/part/client.js:52:18)
    at Notifications.create(node_modules/node-opensignal-api/lib/part/notifications.js:85:
10)

And this was caused by a typo in the variable declarations of the Client.prototype.request method, that was probably being ignored in older versions of NodeJS.

My NodeJS version is 6.4.0 Edit: my apologies, I was running my app with --use_strict flag. Still, nice to have strict mode support.

SeVeNDuS commented 8 years ago

Thanks

SeVeNDuS commented 8 years ago

Updated to version 0.0.3