diff options
author | Jo-Philipp Wich <jo@mein.io> | 2020-05-02 23:55:06 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2020-05-02 23:55:06 +0200 |
commit | cd69c118ad04ca36c2530fec225b28ad338a50e9 (patch) | |
tree | cc23d9a562195a586ff563aebf610ea6f1c004b2 /applications | |
parent | 4df3a90b3d638e18b9607a5332033df7ceb0ec55 (diff) |
luci-app-nlbwmon: gracefully handle failing oui db download
Fixes: #3980
Fixes: fdce990b9 ("luci-app-nlbwmon: convert to client side JS")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'applications')
-rw-r--r-- | applications/luci-app-nlbwmon/htdocs/luci-static/resources/view/nlbw/display.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/applications/luci-app-nlbwmon/htdocs/luci-static/resources/view/nlbw/display.js b/applications/luci-app-nlbwmon/htdocs/luci-static/resources/view/nlbw/display.js index 1bf6687822..1b654d7bca 100644 --- a/applications/luci-app-nlbwmon/htdocs/luci-static/resources/view/nlbw/display.js +++ b/applications/luci-app-nlbwmon/htdocs/luci-static/resources/view/nlbw/display.js @@ -50,8 +50,8 @@ return view.extend({ loadOUI: function() { var url = 'https://raw.githubusercontent.com/jow-/oui-database/master/oui.json'; - return L.resolveDefault(request.get(url, { cache: true }), []).then(function(res) { - res = res.json(); + return L.resolveDefault(request.get(url, { cache: true })).then(function(res) { + res = res ? res.json() : []; if (Array.isArray(res)) ouiData = res; |