Skip to content

Commit

Permalink
mutation issue
Browse files Browse the repository at this point in the history
Signed-off-by: Shivam Gupta <[email protected]>
  • Loading branch information
ShivamCoder23 committed Dec 28, 2024
1 parent 50cc969 commit 7b4f882
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = {
flags: {
FAST_DEV: true,
PARALLEL_SOURCING: true,
// PRESERVE_FILE_DOWNLOAD_CACHE: true,
PRESERVE_FILE_DOWNLOAD_CACHE: true,
DETECT_NODE_MUTATIONS: true,
PARTIAL_HYDRATION: true
},
Expand Down
9 changes: 9 additions & 0 deletions gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -905,6 +905,15 @@ exports.onCreateNode = ({ node, actions, getNode }) => {
onCreateChapterNode({ actions, node, slug });
return;
}

if (node.internal.type === "Mdx") {
if (!node.frontmatter.thumbnail) {
node.frontmatter.thumbnail = null;
}
if (!node.frontmatter.darkthumbnail) {
node.frontmatter.darkthumbnail = null;
}
}
}
}
};
Expand Down

0 comments on commit 7b4f882

Please sign in to comment.