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