From adf24dd1fb29112a88706165714e0489e5e3e501 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicole=20Miko=C5=82ajczyk?= Date: Mon, 5 May 2025 09:45:10 +0200 Subject: [PATCH] pl-fe: fix detecting standalone mode but this time fr MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nicole Mikołajczyk --- packages/pl-fe/src/actions/instance.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/pl-fe/src/actions/instance.ts b/packages/pl-fe/src/actions/instance.ts index 3f2370050..15f95e4a5 100644 --- a/packages/pl-fe/src/actions/instance.ts +++ b/packages/pl-fe/src/actions/instance.ts @@ -47,7 +47,7 @@ interface StandaloneCheckSuccessAction { const checkIfStandalone = () => (dispatch: AppDispatch) => staticFetch('/api/v1/instance', { method: 'HEAD' }) - .then(({ ok, headers }) => dispatch({ type: STANDALONE_CHECK_SUCCESS, ok: ok && headers.get('content-type') === 'application/json' })) + .then(({ ok, headers }) => dispatch({ type: STANDALONE_CHECK_SUCCESS, ok: ok && !!headers.get('content-type')?.includes('application/json') })) .catch((err) => dispatch({ type: STANDALONE_CHECK_SUCCESS, ok: err.response?.ok })); type InstanceAction =