Skip to content

Commit 653bd04

Browse files
dave-pFlole998
authored andcommitted
Check for hidden fields before reading them. Fixes #1782.
1 parent 26ec161 commit 653bd04

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎src/webui/static/app/timeshift.js‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ tvheadend.timeshift = function(panel, index) {
77
var ramonly = f.findField('ram_only');
88
var maxperiod = f.findField('max_period');
99
var maxsize = f.findField('max_size');
10-
maxperiod.setDisabled(unlperiod.getValue());
11-
maxsize.setDisabled(unlsize.getValue() || ramonly.getValue());
10+
if (unlperiod !== null)
11+
maxperiod.setDisabled(unlperiod.getValue());
12+
if (unlsize !== null && ramonly !== null)
13+
maxsize.setDisabled(unlsize.getValue() || ramonly.getValue());
1214
}
1315

1416
tvheadend.idnode_simple(panel, {

0 commit comments

Comments
 (0)