Skip to content

Commit

Permalink
fix react test bug
Browse files Browse the repository at this point in the history
  • Loading branch information
radiden committed Aug 30, 2024
1 parent e65de35 commit 63f1464
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions packages/houdini/src/lib/parse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,15 @@ export async function printJS(
script: Script,
options?: PrintOptions
): Promise<{ code: string; map?: any }> {
const defaultOptions: PrintOptions = {
tabWidth: 4,
}
if (options?.pretty) {
return prettyPrint(script, options)
return prettyPrint(
script,
options ? deepMerge('', defaultOptions, options) : defaultOptions
)
} else {
return print(script, options)
return print(script, options ? deepMerge('', defaultOptions, options) : defaultOptions)
}
}

0 comments on commit 63f1464

Please sign in to comment.