luci: tools: Fix error "Cannot read properties of null (reading 'autorun')"

This commit is contained in:
remittor
2026-01-28 11:08:58 +03:00
parent 53592e98a0
commit 821fedf525

View File

@@ -423,7 +423,7 @@ return baseclass.extend({
let svc_autorun = _('Unknown');
let svc_daemons = _('Unknown');
if (typeof(svcinfo) == 'object') {
if (typeof(svcinfo) == 'object' && svcinfo?.autorun !== undefined) {
svc_autorun = (svcinfo.autorun) ? _('Enabled') : _('Disabled');
if (!svcinfo.dmn.inited) {
svc_daemons = _('Stopped');