Skip to content

Commit

Permalink
minor refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
brillout committed Aug 15, 2024
1 parent 0d28905 commit aab9411
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions vike-solid/renderer/onRenderClient.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ const onRenderClient: OnRenderClientAsync = async (

if (!pageContext.isHydration) {
pageContext._headAlreadySet = true;
// E.g. document.title
updateDocument(pageContext);
applyHeadSettings(pageContext);
}

// Use cases:
Expand All @@ -52,7 +51,7 @@ const onRenderClient: OnRenderClientAsync = async (
await callCumulativeHooks(pageContext.config.onAfterRenderClient, pageContext);
};

function updateDocument(pageContext: PageContextClient) {
function applyHeadSettings(pageContext: PageContextClient) {
const title = getHeadSetting<string | null>("title", pageContext);
const lang = getHeadSetting<string | null>("lang", pageContext);

Expand Down

0 comments on commit aab9411

Please sign in to comment.