Don't redirect to HTML-only mode if in debug mode

This commit is contained in:
Toby Zerner 2015-08-14 12:50:15 +09:30
parent 6cee3b7160
commit 8065c980d4
2 changed files with 4 additions and 1 deletions

View File

@ -26,6 +26,7 @@ class ForumSerializer extends Serializer
'title' => Core::config('forum_title'),
'baseUrl' => Core::config('base_url'),
'basePath' => parse_url(Core::config('base_url'), PHP_URL_PATH) ?: '',
'debug' => Core::inDebugMode(),
'apiUrl' => Core::config('api_url'),
'welcomeTitle' => Core::config('welcome_title'),
'welcomeMessage' => Core::config('welcome_message'),

View File

@ -38,7 +38,9 @@
app.boot();
} catch (e) {
window.location = window.location + '?nojs=1';
@if (! $forum->attributes->debug)
window.location = window.location + '?nojs=1';
@endif
throw e;
}
</script>