Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
  • Loading branch information
MindFreeze and bramkragten authored Nov 12, 2024
1 parent 8ea5f19 commit adaaa64
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,9 @@ class ZWaveJSCustomParam extends LitElement {
}

private _tryParseNumber(value: string): number | undefined {
if (!value) return;
if (!value) return undefined;
const parsed = Number(value);
if (Number.isNaN(parsed)) return;
// eslint-disable-next-line consistent-return -- not sure why eslint expects no return here
if (Number.isNaN(parsed)) return undefined;
return parsed;
}

Expand Down

0 comments on commit adaaa64

Please sign in to comment.