Skip to content

Commit

Permalink
fix<codemod-legacy-upgrade>: add cookiePrefix step
Browse files Browse the repository at this point in the history
  • Loading branch information
LeonMueller-OneAndOnly committed Jan 13, 2024
1 parent 850d58f commit 8519dfa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/codemod/src/upgrade-legacy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,9 @@ const upgradeLegacy = async () => {
j.Identifier,
(node) => node.name === "cookiePrefix",
)
cookieIdentifierBlitzClient.get().parentPath.value.value.value = cookiePrefix
if (cookieIdentifier.length) {
cookieIdentifierBlitzClient.get().parentPath.value.value.value = cookiePrefix
}

fs.writeFileSync(
`${appDir}/blitz-client.${isTypescript ? "ts" : "js"}`,
Expand Down

0 comments on commit 8519dfa

Please sign in to comment.