Skip to content

Commit

Permalink
chore: fix file node check
Browse files Browse the repository at this point in the history
  • Loading branch information
ascorbic committed Apr 26, 2023
1 parent 004f535 commit 4024b38
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/gatsby-source-drupal/src/normalize.ts
Expand Up @@ -148,7 +148,7 @@ export const generateTypeName = (type: string, typePrefix = ``) => {
? `${capitalize(typePrefix)}${capitalize(type)}`
: type

return prefixed.replace(/-|__|:|\.|\s/g, `_`)
return prefixed.replace(/-|:|\.|\s/g, `_`)
}

export const nodeFromData = async (
Expand Down Expand Up @@ -282,7 +282,7 @@ export const isFileNode = (node, typePrefix = ``) => {
typePrefix,
new Set<string>([
generateTypeName(`files`, typePrefix),
generateTypeName(`file_file`, typePrefix),
generateTypeName(`file__file`, typePrefix),
])
)
}
Expand Down

0 comments on commit 4024b38

Please sign in to comment.