From 63b71b87df61bf8d8cb3a12db025d7bb20314ca9 Mon Sep 17 00:00:00 2001 From: F4ilji Date: Mon, 6 Jul 2026 18:59:24 +0500 Subject: [PATCH] =?UTF-8?q?fix(ssr):=20always=20return=20{head,body}=20fro?= =?UTF-8?q?m=20createInertiaApp=20=E2=80=94=20.then()=20fallback=20for=20u?= =?UTF-8?q?ndefined=20resolve?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/js/ssr.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/resources/js/ssr.js b/resources/js/ssr.js index 8cff6e7..bc455d6 100755 --- a/resources/js/ssr.js +++ b/resources/js/ssr.js @@ -45,6 +45,8 @@ import { ZiggyVue } from '../../vendor/tightenco/ziggy/dist/vue.m'; import { Ziggy } from './ziggy'; import { createSsrErrorHandler, logSsrError } from './ssr/errorHandler.js'; +const EMPTY_RESPONSE = { head: [], body: '' }; + createServer(page => createInertiaApp({ page, @@ -74,8 +76,8 @@ createServer(page => .use(plugin) .use(ZiggyVue, ziggyConfig); }, - }).catch(error => { + }).then(result => result ?? EMPTY_RESPONSE).catch(error => { logSsrError(error); - return ''; + return EMPTY_RESPONSE; }) ); \ No newline at end of file