From: dave-p Date: Mon, 11 Nov 2024 12:56:12 +0000 (+0000) Subject: Check for hidden fields before reading them. Fixes #1782. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=653bd0400b4413db96b80c807f0f7524f9248adb;p=thirdparty%2Ftvheadend.git Check for hidden fields before reading them. Fixes #1782. --- 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, {