pl-fe: fix detecting standalone mode but this time fr

Signed-off-by: Nicole Mikołajczyk <git@mkljczk.pl>
This commit is contained in:
Nicole Mikołajczyk
2025-05-05 09:45:10 +02:00
parent 5dafac744d
commit adf24dd1fb

View File

@ -47,7 +47,7 @@ interface StandaloneCheckSuccessAction {
const checkIfStandalone = () => (dispatch: AppDispatch) =>
staticFetch('/api/v1/instance', { method: 'HEAD' })
.then(({ ok, headers }) => dispatch<StandaloneCheckSuccessAction>({ type: STANDALONE_CHECK_SUCCESS, ok: ok && headers.get('content-type') === 'application/json' }))
.then(({ ok, headers }) => dispatch<StandaloneCheckSuccessAction>({ type: STANDALONE_CHECK_SUCCESS, ok: ok && !!headers.get('content-type')?.includes('application/json') }))
.catch((err) => dispatch<StandaloneCheckSuccessAction>({ type: STANDALONE_CHECK_SUCCESS, ok: err.response?.ok }));
type InstanceAction =