Skip to content

Commit

Permalink
allow a componentField to be included twice
Browse files Browse the repository at this point in the history
  • Loading branch information
AlecAivazis committed Mar 9, 2024
1 parent 4006b9d commit 018e0cf
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions packages/houdini/src/codegen/generators/typescript/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,17 @@ export function scalarPropertyValue(
let sourcePath = path.join(sourcePathParsed.dir, sourcePathParsed.name)

// add the import
const localImport = ensureImports({
config,
body,
import: '__component__' + component.fragment,
sourceModule: path.join(
path.relative(path.dirname(filepath), config.projectRoot),
'src',
sourcePath
),
})
const localImport =
ensureImports({
config,
body,
import: '__component__' + component.fragment,
sourceModule: path.join(
path.relative(path.dirname(filepath), config.projectRoot),
'src',
sourcePath
),
}) ?? '__component__' + component.fragment

// build up the AST for the parameter type
const parameters = AST.tsTypeReference(AST.identifier('Parameters'))
Expand Down

0 comments on commit 018e0cf

Please sign in to comment.