Fixing random crap Deepsource complained about

This commit is contained in:
Michał Gdula 2023-04-08 19:46:03 +00:00
parent 5cb8c1dd13
commit f4ea1984b0
3 changed files with 7 additions and 49 deletions

View file

@ -1,7 +1,7 @@
async function checkWebpSupport() {
function checkWebpSupport() {
var webpSupport = false;
try {
webpSupport = document.createElement('canvas').toDataURL('image/webp').indexOf('data:image/webp') == 0;
webpSupport = document.createElement('canvas').toDataURL('image/webp').indexOf('data:image/webp') === 0;
} catch (e) {
webpSupport = false;
}