From 653bd0400b4413db96b80c807f0f7524f9248adb Mon Sep 17 00:00:00 2001 From: dave-p Date: Mon, 11 Nov 2024 12:56:12 +0000 Subject: [PATCH] Check for hidden fields before reading them. Fixes #1782. --- src/webui/static/app/timeshift.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/webui/static/app/timeshift.js b/src/webui/static/app/timeshift.js index 75507d100..b3356e2b3 100644 --- a/src/webui/static/app/timeshift.js +++ b/src/webui/static/app/timeshift.js @@ -7,8 +7,10 @@ tvheadend.timeshift = function(panel, index) { var ramonly = f.findField('ram_only'); var maxperiod = f.findField('max_period'); var maxsize = f.findField('max_size'); - maxperiod.setDisabled(unlperiod.getValue()); - maxsize.setDisabled(unlsize.getValue() || ramonly.getValue()); + if (unlperiod !== null) + maxperiod.setDisabled(unlperiod.getValue()); + if (unlsize !== null && ramonly !== null) + maxsize.setDisabled(unlsize.getValue() || ramonly.getValue()); } tvheadend.idnode_simple(panel, { -- 2.47.3