luci-base: view.htm: catch and render exceptions on view instantiation
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
a0d1294566
commit
34f2c0acdb
1 changed files with 4 additions and 1 deletions
|
@ -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%>
|
||||
|
|
Loading…
Reference in a new issue