disable capabilities.account when no FXA_CLIENT_ID is set

This commit is contained in:
Danny Coates 2018-09-19 12:53:23 -07:00
parent e3087f008c
commit 93e82cf953
No known key found for this signature in database
GPG key ID: 4C442633C62E00CB
3 changed files with 11 additions and 6 deletions

View file

@ -1,3 +1,4 @@
/* global AUTH_CONFIG */
import { browserName } from './utils';
async function checkCrypto() {
@ -64,9 +65,9 @@ export default async function capabilities() {
const crypto = await checkCrypto();
const nativeStreams = checkStreams();
const polyStreams = nativeStreams ? false : polyfillStreams();
let account = false;
let account = typeof AUTH_CONFIG !== 'undefined';
try {
account = !!localStorage;
account = account && !!localStorage;
} catch (e) {
// nevermind
}