1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

M #~: Minor fix to helper function (#2111)

This commit is contained in:
Sergio Betanzos 2022-05-31 17:07:46 +02:00 committed by GitHub
parent c817b6fd62
commit 60c033b563
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -79,7 +79,7 @@ export const booleanToString = (bool) => (bool ? T.Yes : T.No)
* in other cases, return false.
*/
export const stringToBoolean = (str) =>
String(str).toLowerCase() === 'yes' || +str === 1
['yes', 'true'].includes(String(str).toLowerCase()) || +str === 1
/**
* Formats a number into a string according to the currency configuration.