]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Check for hidden fields before reading them. Fixes #1782.
authordave-p <gh@pickles.me.uk>
Mon, 11 Nov 2024 12:56:12 +0000 (12:56 +0000)
committerFlole <Flole998@users.noreply.github.com>
Tue, 12 Nov 2024 23:49:11 +0000 (00:49 +0100)
src/webui/static/app/timeshift.js

index 75507d100990bf8d15626e9efd9dfdcb2ffad376..b3356e2b3e7d722227b324a41ddf276a0b17d024 100644 (file)
@@ -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, {