mirror of
https://github.com/flarum/framework.git
synced 2024-12-13 07:03:35 +08:00
Don't redirect to HTML-only mode if in debug mode
This commit is contained in:
parent
1a56498bc6
commit
6e087f7dc0
|
@ -26,6 +26,7 @@ class ForumSerializer extends Serializer
|
||||||
'title' => Core::config('forum_title'),
|
'title' => Core::config('forum_title'),
|
||||||
'baseUrl' => Core::config('base_url'),
|
'baseUrl' => Core::config('base_url'),
|
||||||
'basePath' => parse_url(Core::config('base_url'), PHP_URL_PATH) ?: '',
|
'basePath' => parse_url(Core::config('base_url'), PHP_URL_PATH) ?: '',
|
||||||
|
'debug' => Core::inDebugMode(),
|
||||||
'apiUrl' => Core::config('api_url'),
|
'apiUrl' => Core::config('api_url'),
|
||||||
'welcomeTitle' => Core::config('welcome_title'),
|
'welcomeTitle' => Core::config('welcome_title'),
|
||||||
'welcomeMessage' => Core::config('welcome_message'),
|
'welcomeMessage' => Core::config('welcome_message'),
|
||||||
|
|
|
@ -38,7 +38,9 @@
|
||||||
|
|
||||||
app.boot();
|
app.boot();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
window.location = window.location + '?nojs=1';
|
@if (! $forum->attributes->debug)
|
||||||
|
window.location = window.location + '?nojs=1';
|
||||||
|
@endif
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user