Skip to content

Commit fbae2a4

Browse files
Fix title helper to fallback to app name when no title is provided (#152)
The page component will only show the app name if it doesn't provide a title.
1 parent 2f6fe6b commit fbae2a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

resources/js/ssr.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ createServer((page) =>
1111
createInertiaApp({
1212
page,
1313
render: renderToString,
14-
title: (title) => `${title} - ${appName}`,
14+
title: (title) => title ? `${title} - ${appName}` : appName,
1515
resolve: resolvePage,
1616
setup: ({ App, props, plugin }) =>
1717
createSSRApp({ render: () => h(App, props) })

0 commit comments

Comments
 (0)