Skip to content

Commit

Permalink
chore(pretty): make pretty happy
Browse files Browse the repository at this point in the history
  • Loading branch information
nurikk committed Feb 3, 2024
1 parent cf7af20 commit b811387
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@
"@typescript-eslint/eslint-plugin": "~6.7.4",
"@typescript-eslint/parser": "~6.7.4",
"@vitejs/plugin-react": "~4.1.0",
"@vitest/coverage-v8": "^1.2.2",
"ace-builds": "~1.28.0",
"bootstrap": "~5.3.2",
"classnames": "~2.3.2",
Expand Down
9 changes: 3 additions & 6 deletions src/components/settings-page/image-localiser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ async function asyncSome<X>(arr: Iterable<X>, predicate: (x: X) => Promise<boole
if (await predicate(e)) {
return true;
}
} catch (err) { }
} catch (err) {}
}
return false;
};
}

function ImageLocaliser(props: Props): JSX.Element {
const [currentState, setCurrentState] = useState<LocaliserState>('none');
Expand All @@ -52,10 +52,7 @@ function ImageLocaliser(props: Props): JSX.Element {
setLocalisationStatus((curr) => {
return { ...curr, [device.ieee_address]: 'init' };
});
const success = await asyncSome([
getZ2mDeviceImagePng,
getZ2mDeviceImage,
], async (generator) => {
const success = await asyncSome([getZ2mDeviceImagePng, getZ2mDeviceImage], async (generator) => {
const imageUrl = generator(device);
const imageContent = await downloadImage(imageUrl);
await setDeviceOptions(device.ieee_address, { icon: imageContent });
Expand Down
2 changes: 1 addition & 1 deletion vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default defineConfig(async ({ command, mode }) => {
environment: 'jsdom',
setupFiles: '../setupTests.js',
coverage: {
provider: 'v8'
provider: 'v8',
},
onConsoleLog(log, type) {
if (log?.includes('18next')) {
Expand Down

0 comments on commit b811387

Please sign in to comment.