luci-mod-status: fix determining DSL modem type
The `network.getDSLModemType()` function returns a promise, so handle it
accordingly.
Fixes: 45ab2cd6be
("luci-mod-status: use network.getDSLModemType()")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
497b375eeb
commit
b5f11bf6ee
1 changed files with 5 additions and 3 deletions
|
@ -45,10 +45,12 @@ return baseclass.extend({
|
||||||
title: _('DSL'),
|
title: _('DSL'),
|
||||||
|
|
||||||
load: function() {
|
load: function() {
|
||||||
if (!network.getDSLModemType())
|
return network.getDSLModemType().then(function(type) {
|
||||||
return Promise.reject();
|
if (!type)
|
||||||
|
return Promise.reject();
|
||||||
|
|
||||||
return L.resolveDefault(callDSLMetrics(), {});
|
return L.resolveDefault(callDSLMetrics(), {});
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
render: function(dsl) {
|
render: function(dsl) {
|
||||||
|
|
Loading…
Reference in a new issue