Skip to content

Commit

Permalink
fix(useConfig): enable using useConfig() with HTML streaming
Browse files Browse the repository at this point in the history
  • Loading branch information
phonzammi committed Sep 3, 2024
1 parent 7943868 commit 555aa71
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions packages/vike-solid/hooks/useConfig/useConfig-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,7 @@ function useConfig(): (config: ConfigFromHook) => void {

// Component
pageContext = usePageContext();
return (config: ConfigFromHook) => {
if (!pageContext._headAlreadySet) {
setPageContextConfigFromHook(config, pageContext);
} else {
throw new Error("Using useConfig() with HTML streaming isn't supported yet");
}
};
return (config: ConfigFromHook) => setPageContextConfigFromHook(config, pageContext);
}

const configsClientSide = ["title"];
Expand Down

0 comments on commit 555aa71

Please sign in to comment.