fixed leaky app.state on the server-side. fixes #928

This commit is contained in:
Danny Coates 2018-09-18 16:23:58 -07:00
parent 17a0393ce0
commit 99055b1342
No known key found for this signature in database
GPG key ID: 4C442633C62E00CB
4 changed files with 52 additions and 50 deletions

View file

@ -1,3 +1,5 @@
import { browserName } from './utils';
async function checkCrypto() {
try {
const key = await crypto.subtle.generateKey(
@ -76,10 +78,7 @@ export default async function capabilities() {
streamDownload:
nativeStreams &&
'serviceWorker' in navigator &&
!(
/safari/i.test(navigator.userAgent) &&
!/chrome/i.test(navigator.userAgent)
),
browserName() !== 'safari',
multifile: nativeStreams || polyStreams
};
}