1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

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) { function sha256(str) {
if (!self.TextEncoder) {
return Promise.resolve('');
}
const buffer = new TextEncoder('utf-8').encode(str); const buffer = new TextEncoder('utf-8').encode(str);
return crypto.subtle.digest('SHA-256', buffer).then(function (hash) { return crypto.subtle.digest('SHA-256', buffer).then(function (hash) {