Retsly/retsly-js-sdk — pull request #23 by switters (2014-09-06 20:50:28+00:00)
Title: retsly-js-sdk attempting requests when no token set - 401s inevitable

The sdk is currently trying to make requests even when the token has been unset -- for example: when the user has logged out. This request is inevitably fruitless and results in a 401.

Proposed solution: at Retsly.prototype.request, return before request is made if .getToken() returns undefined.