From 517da47da7b1a9fbbf0cdfdaf391363713881b78 Mon Sep 17 00:00:00 2001 From: Sahil Batra Date: Tue, 6 Feb 2024 16:35:33 +0530 Subject: [PATCH] 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. --- web/src/settings_components.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/settings_components.js b/web/src/settings_components.js index c82818a925..7367a8adff 100644 --- a/web/src/settings_components.js +++ b/web/src/settings_components.js @@ -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)) {