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

Check for undefined data in source-drupal #1664

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sonianb
Copy link

@sonianb sonianb commented Dec 20, 2022

I am trying to create a field in Drupal that references a content type but the build fails with the error TypeError: Cannot read properties of undefined (reading 'type') at [Entity.createReference](https://entity.createreference/) (/app/front/node_modules/@gridsome/source-drupal/lib/Entity.js:150:47).

This seems to be happening because the processRelationships function in the source-drupal package checks whether data is null but doesn't check whether it's undefined. This causes the build to fail when data is undefined.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant