1
0
mirror of https://github.com/flarum/core.git synced 2025-07-21 16:51:34 +02:00

Don't catch JS error in debug mode

This commit is contained in:
Toby Zerner
2015-09-23 10:51:49 +09:30
parent 850f6ca331
commit 3af9cd794d

View File

@@ -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