only set header if authToken exists

This commit is contained in:
Sean Yesmunt 2019-10-24 13:37:26 -04:00
parent 034cef3ed7
commit a0f4bf7830

View file

@ -110,7 +110,11 @@ Lbryio.setOverride(
// @endif // @endif
// @if TARGET='web' // @if TARGET='web'
const authToken = getAuthToken(); const authToken = getAuthToken();
if (authToken) {
Lbry.setApiHeader(X_LBRY_AUTH_TOKEN, authToken); Lbry.setApiHeader(X_LBRY_AUTH_TOKEN, authToken);
}
resolve(authToken); resolve(authToken);
// @endif // @endif
} }