Skip to content

Commit e2e3f7f

Browse files
Joe Gogginsbusticated
andauthored
Rewrite _getEffectiveAuth() concisely
Co-authored-by: Matthew Mirande <busticated@users.noreply.github.com>
1 parent f7e7ddc commit e2e3f7f

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/Particle.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2118,13 +2118,7 @@ class Particle {
21182118
* @returns {String|undefined} a Particle auth token or undefined
21192119
*/
21202120
_getEffectiveAuth(auth) {
2121-
if (auth) {
2122-
return auth;
2123-
} else if (this._defaultAuth) {
2124-
return this._defaultAuth;
2125-
} else {
2126-
return undefined;
2127-
}
2121+
return auth || this._defaultAuth
21282122
}
21292123
/**
21302124
* API URI to access a device

0 commit comments

Comments
 (0)