Fix a bug in the climate entity more info card (#12973)

This commit is contained in:
Brandon Rothweiler 2022-06-20 08:29:42 -04:00 committed by GitHub
parent e765d7749c
commit 276b6f4d1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,6 +5,6 @@ export const clamp = (value: number, min: number, max: number) =>
export const conditionalClamp = (value: number, min?: number, max?: number) => {
let result: number;
result = min ? Math.max(value, min) : value;
result = max ? Math.min(value, max) : value;
result = max ? Math.min(result, max) : result;
return result;
};