luci-base: fix error 404 on missing relay protocol
Currently relay.js is included in any case even if
the router doesn't have the needed package to use it.
Fix this by checking if the system has this feature.
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
(cherry picked from commit 3d70d3e5d7
)
This commit is contained in:
parent
de94bfefbd
commit
9c5408499a
1 changed files with 1 additions and 1 deletions
|
@ -108,7 +108,7 @@ function getProtocolHandlers(cache) {
|
|||
Object.assign(protos, { none: { no_device: false } });
|
||||
|
||||
/* Hack: emulate relayd protocol */
|
||||
if (!protos.hasOwnProperty('relay'))
|
||||
if (!protos.hasOwnProperty('relay') && L.hasSystemFeature('relayd'))
|
||||
Object.assign(protos, { relay: { no_device: true } });
|
||||
|
||||
Object.assign(_protospecs, protos);
|
||||
|
|
Loading…
Reference in a new issue