projects
/
oweals
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a0d1294
)
luci-base: view.htm: catch and render exceptions on view instantiation
author
Jo-Philipp Wich
<jo@mein.io>
Wed, 11 Sep 2019 10:21:51 +0000
(12:21 +0200)
committer
Jo-Philipp Wich
<jo@mein.io>
Wed, 11 Sep 2019 10:21:51 +0000
(12:21 +0200)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-base/luasrc/view/view.htm
patch
|
blob
|
history
diff --git
a/modules/luci-base/luasrc/view/view.htm
b/modules/luci-base/luasrc/view/view.htm
index bddd8e4464ac50661e364bceacf5467c57941f11..9220ecf2992e1803f46e6547f5ef65ce636da8ef 100644
(file)
--- a/
modules/luci-base/luasrc/view/view.htm
+++ b/
modules/luci-base/luasrc/view/view.htm
@@
-2,7
+2,10
@@
<div id="view">
<div class="spinning"><%:Loading view…%></div>
- <script type="text/javascript">L.require('view.<%=view%>');</script>
+ <script type="text/javascript">L.require('view.<%=view%>').catch(function(err) {
+ L.dom.content(document.querySelector('#view'), null);
+ L.error(err);
+ });</script>
</div>
<%+footer%>