Skip to content

Conversation

@brdv
Copy link
Member

@brdv brdv commented Jan 5, 2026

Summary

Fixes a bug where passing null to a JsonApiResource would cause errors when trying to access properties during ID resolution.

Changes

  • Added null check in getId() to return null early when resource is null
  • Added test case to verify null resources return empty data arrays

@brdv brdv requested a review from mooya January 5, 2026 13:05
@brdv brdv self-assigned this Jan 5, 2026
Copy link

@mooya mooya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looking good!

@brdv brdv merged commit ecdd43c into main Jan 5, 2026
2 checks passed
@brdv brdv deleted the fix/handle-null-resource branch January 5, 2026 14:51
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.

3 participants