Skip to content

Commit

Permalink
touch GreenhouseJobDepartmentNode type nodes to avoid GC
Browse files Browse the repository at this point in the history
  • Loading branch information
cometkim committed Mar 1, 2023
1 parent f515b6a commit 0996468
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/ten-cherries-accept.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@karrotmarket/gatsby-source-greenhouse-jobboard": minor
---

touch GreenhouseJobDepartmentNode type nodes to avoid GC
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,10 @@ export const sourceNodes: GatsbyNode['sourceNodes'] = async ({
actions.createNode(node);
}

const shouldLeave = new Set<string>(jobNodes.map(node => node.id));
const shouldLeave = new Set<string>([
...jobNodes.map(node => node.id),
...departmentNodes.map(node => node.id),
]);
const cachedNodes = [
...getNodesByType('GreenhouseJobBoardJob'),
...getNodesByType('GreenhouseJobBoardDepartment'),
Expand Down

0 comments on commit 0996468

Please sign in to comment.