forked from gatsbyjs/gatsby
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Get parent not root File node in resolver (gatsbyjs#13289)
In the `fileByPath` resolver, we need a node's parent `File` node to resolve relative to absolute paths. For this we use `findRootNodeAncestor`, which will return a node's root node. This can be problematic for (unusual) scenarios like in gatsbyjs#13267 where a node has more than one `File` node ancestor. We should just use the closest `File` parent. Fixes gatsbyjs#13267
- Loading branch information
1 parent
52b4f3c
commit 8031fcf
Showing
2 changed files
with
55 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters