Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(gatsby): Remove deleteNode with ID arg #29205

Merged
merged 10 commits into from
Feb 10, 2021
Prev Previous commit
Next Next commit
Merge branch 'master' into v3/delete-node-with-id-argument
  • Loading branch information
LekoArts authored Feb 10, 2021
commit bb5c2e8829d08a6a2358c33fbe493c70fef04427
6 changes: 5 additions & 1 deletion packages/gatsby/src/redux/actions/public.js
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,11 @@ actions.deleteNode = (node: any, plugin?: Plugin) => {
if (plugin) {
const pluginName = plugin.name

if (internalNode && typeOwners[internalNode.internal.type] !== pluginName)
if (
internalNode &&
typeOwners[internalNode.internal.type] &&
typeOwners[internalNode.internal.type] !== pluginName
)
throw new Error(stripIndent`
The plugin "${pluginName}" deleted a node of a type owned by another plugin.

Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.