self.TextEncoder will never exist, so remove invalid check

This commit is contained in:
Neil Burrows 2020-11-07 10:49:54 +00:00
parent f140d9fe06
commit 9bce0aea18

View File

@ -84,9 +84,6 @@ export default function (page, providerId, options) {
}
function sha256(str) {
if (!self.TextEncoder) {
return Promise.resolve('');
}
const buffer = new TextEncoder('utf-8').encode(str);
return crypto.subtle.digest('SHA-256', buffer).then(function (hash) {