settings: Return empty string for "Anytime" case.

We use 'get_realm_time_limits_in_minutes' function to get the
value to be put in the custom input element. Previously, we
returned "null" for the case when the setting was set to
"Anytime", but now we instead return an empty string as returning
null created some issues while converting the file to typescript.

There is no change in behavior due to this as in both cases the
input will be empty.
This commit is contained in:
Sahil Batra 2024-02-06 16:35:33 +05:30 committed by Tim Abbott
parent b5e4d1d0e7
commit 517da47da7

View File

@ -39,7 +39,7 @@ export function get_sorted_options_list(option_values_object) {
export function get_realm_time_limits_in_minutes(property) {
if (realm[property] === null) {
// This represents "Anytime" case.
return null;
return "";
}
let val = (realm[property] / 60).toFixed(1);
if (Number.parseFloat(val, 10) === Number.parseInt(val, 10)) {