Skip to content

Commit

Permalink
Remove crypto.subtle.digest test, since it's polyfilled
Browse files Browse the repository at this point in the history
  • Loading branch information
00dani authored and Simounet committed Mar 20, 2024
1 parent e646d12 commit 2ef77aa
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions wallabagger/js/wallabag-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,8 @@ WallabagApi.prototype = {
},

SupportsHashedUrl: function () {
const clientCanHashUrls = (typeof crypto === 'object') && (typeof crypto.subtle === 'object') && (typeof crypto.subtle.digest === 'function');
return this.GetVersion().then(([major, minor]) => {
const serverSupportsHashedUrl = (major > 2) || (major === 2 && minor >= 6);
return serverSupportsHashedUrl && clientCanHashUrls;
return (major > 2) || (major === 2 && minor >= 6);
});
},

Expand Down

0 comments on commit 2ef77aa

Please sign in to comment.