feat: promise safety with eslint

This commit is contained in:
Mythie
2023-08-29 13:01:19 +10:00
parent ba054ae915
commit ca40e983e3
35 changed files with 103 additions and 57 deletions

View File

@ -67,7 +67,7 @@ export function FeatureFlagProvider({
const interval = setInterval(() => {
if (document.hasFocus()) {
getAllFlags().then((newFlags) => setFlags(newFlags));
void getAllFlags().then((newFlags) => setFlags(newFlags));
}
}, FEATURE_FLAG_POLL_INTERVAL);
@ -84,7 +84,7 @@ export function FeatureFlagProvider({
return;
}
const onFocus = () => getAllFlags().then((newFlags) => setFlags(newFlags));
const onFocus = () => void getAllFlags().then((newFlags) => setFlags(newFlags));
window.addEventListener('focus', onFocus);