Skip to content

Commit

Permalink
change falsiness check to type check
Browse files Browse the repository at this point in the history
  • Loading branch information
aarron-lee committed Apr 25, 2024
1 parent bdd85c4 commit d036cc1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/backend/alsListener.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const handleAls = async () => {

const alsValue = await readAls();
log && logInfo(`ALS value: ${alsValue}`);
if (!alsValue) {
if (typeof alsValue !== 'number') {
continue;
}

Expand Down

0 comments on commit d036cc1

Please sign in to comment.