Fix check for crypto.subtle (#707)

This commit is contained in:
Jed Fox
2023-02-28 12:53:37 -05:00
committed by GitHub
parent 18eae3ebf6
commit b90da4404c

View File

@@ -9,9 +9,7 @@ import { Setting } from './UI';
export default function EncryptionSettings({ prefs, pushModal }) {
const serverURL = useServerURL();
const missingCryptoAPI = !(
window.crypto && Object.hasOwnProperty.call(crypto, 'subtle')
);
const missingCryptoAPI = !(window.crypto && crypto.subtle);
function onChangeKey() {
pushModal('create-encryption-key', { recreate: true });