fix: build error due to top level await

This commit is contained in:
David Ralph
2022-12-08 16:25:50 +00:00
committed by GitHub
parent e161b82ad3
commit 440d20d7be
2 changed files with 9 additions and 7 deletions

View File

@@ -116,7 +116,7 @@ export default class Background extends PureComponent {
break;
}
const accept = 'application/json, ' + (supportsAVIF ? 'image/avif' : 'image/webp');
const accept = 'application/json, ' + (await supportsAVIF() ? 'image/avif' : 'image/webp');
try {
data = await (await fetch(requestURL, { headers: { accept } })).json();
} catch (e) {