fixed capabilities.account when localStorage is disabled
This commit is contained in:
parent
942457b357
commit
7dcf4bcdb9
2 changed files with 17 additions and 3 deletions
|
@ -62,9 +62,15 @@ export default async function capabilities() {
|
|||
const crypto = await checkCrypto();
|
||||
const nativeStreams = checkStreams();
|
||||
const polyStreams = nativeStreams ? false : polyfillStreams();
|
||||
let account = false;
|
||||
try {
|
||||
account = !!localStorage;
|
||||
} catch (e) {
|
||||
// nevermind
|
||||
}
|
||||
|
||||
return {
|
||||
account: typeof localStorage !== 'undefined',
|
||||
account,
|
||||
crypto,
|
||||
streamUpload: nativeStreams || polyStreams,
|
||||
streamDownload:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue