Skip to content

Commit

Permalink
Ensure absolute path expects (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
chawes13 authored May 8, 2023
1 parent d435db1 commit 387b1de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/on-create-node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const onCreateNode = (
) => {
const options = defaults(pluginOptions, defaultPluginOptions);

if (node.internal.type === `MarkdownRemark` || node.internal.type === `Mdx`) {
if (node.fileAbsolutePath && node.internal.type === `MarkdownRemark` || node.internal.type === `Mdx`) {
const files = getNodesByType(`File`);

const directory = path.dirname(node.fileAbsolutePath);
Expand Down

0 comments on commit 387b1de

Please sign in to comment.