From 6e087f7dc06a9f82ec658be21560dbddaea94cfc Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Fri, 14 Aug 2015 12:50:15 +0930 Subject: [PATCH] Don't redirect to HTML-only mode if in debug mode --- framework/core/src/Api/Serializers/ForumSerializer.php | 1 + framework/core/views/app.blade.php | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/framework/core/src/Api/Serializers/ForumSerializer.php b/framework/core/src/Api/Serializers/ForumSerializer.php index e49cbfee3..874dddcb7 100644 --- a/framework/core/src/Api/Serializers/ForumSerializer.php +++ b/framework/core/src/Api/Serializers/ForumSerializer.php @@ -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'), diff --git a/framework/core/views/app.blade.php b/framework/core/views/app.blade.php index 858fefc11..7fdf0d900 100644 --- a/framework/core/views/app.blade.php +++ b/framework/core/views/app.blade.php @@ -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; }