Skip to content

Commit

Permalink
fix(ignore): Fix assertNumber Koenkk/zigbee2mqtt#17866
Browse files Browse the repository at this point in the history
  • Loading branch information
Koenkk committed Jun 2, 2023
1 parent 96f288b commit 2b70550
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/utils2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export function assertString(value: unknown, property: string): asserts value is
}

export function assertNumber(value: unknown, property: string): asserts value is number {
if (typeof value === 'number') throw new Error(`'${property}' is not a number, got ${typeof value} (${value.toString()})`);
if (typeof value !== 'number') throw new Error(`'${property}' is not a number, got ${typeof value} (${value.toString()})`);
}

export function getFromLookup<V>(value: unknown, lookup: {[s: string | number]: V}): V {
Expand Down

0 comments on commit 2b70550

Please sign in to comment.