mirror of
https://github.com/flarum/framework.git
synced 2025-01-19 18:12:59 +08:00
Don't catch JS error in debug mode
This commit is contained in:
parent
850f6ca331
commit
3af9cd794d
|
@ -27,7 +27,9 @@
|
|||
@endforeach
|
||||
|
||||
<script>
|
||||
@if (! $forum->attributes->debug)
|
||||
try {
|
||||
@endif
|
||||
var app = System.get('flarum/app').default;
|
||||
|
||||
babelHelpers._extends(app, {!! json_encode($app) !!});
|
||||
|
@ -37,12 +39,11 @@
|
|||
@endforeach
|
||||
|
||||
app.boot();
|
||||
@if (! $forum->attributes->debug)
|
||||
} catch (e) {
|
||||
@if (! $forum->attributes->debug)
|
||||
window.location = window.location + '?nojs=1';
|
||||
@endif
|
||||
throw e;
|
||||
window.location = window.location + '?nojs=1';
|
||||
}
|
||||
@endif
|
||||
</script>
|
||||
@endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user