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
// @if TARGET='web'
const authToken = getAuthToken();
Lbry.setApiHeader(X_LBRY_AUTH_TOKEN, authToken);
if (authToken) {
Lbry.setApiHeader(X_LBRY_AUTH_TOKEN, authToken);
}
resolve(authToken);
// @endif
}