Commit 4471182d authored by Robert Knight's avatar Robert Knight

Simplify a check for `undefined`

Checking `typeof <var>` is only needed when the variable may not exist
(eg. some browser global).
parent bb742fa1
...@@ -208,7 +208,7 @@ export class AuthService extends TinyEmitter { ...@@ -208,7 +208,7 @@ export class AuthService extends TinyEmitter {
// Determine how to get an access token, depending on the login method being used. // Determine how to get an access token, depending on the login method being used.
if (!tokenInfoPromise) { if (!tokenInfoPromise) {
const grantToken = getGrantToken(); const grantToken = getGrantToken();
if (typeof grantToken !== 'undefined') { if (grantToken !== undefined) {
if (grantToken) { if (grantToken) {
// User is logged-in on the publisher's website. // User is logged-in on the publisher's website.
// Exchange the grant token for a new access token. // Exchange the grant token for a new access token.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment