Skip to content

Conversation

@Ayoub-Mabrouk
Copy link
Contributor

@Ayoub-Mabrouk Ayoub-Mabrouk commented Nov 7, 2025

Add explicit return undefined for non-nested keys that don't exist
Add guard clause to prevent accessing properties on null/undefined objects
Improve robustness when accessing nested properties
Add tests to cover new behaviors and prevent regressions

- Add explicit return undefined for non-nested keys that don't exist
- Add guard clause to prevent accessing properties on null/undefined objects
- Improves robustness when accessing nested properties
@UlisesGascon
Copy link
Collaborator

Hey @Ayoub-Mabrouk! Thanks for all the contributions you are doing in systemic too! ❤️

Do you think that we can update the tests to reflect this change and prevent regressions in the future?

Thanks in advance!

Add tests to verify the getProp fix handles edge cases gracefully:
- When first part of nested source path doesn't exist
- When intermediate parts exist but final part doesn't exist
- When component is null/undefined

These tests prevent regressions and ensure the fix works correctly
in the dependency injection flow where getProp is used.
@Ayoub-Mabrouk
Copy link
Contributor Author

Hey @Ayoub-Mabrouk! Thanks for all the contributions you are doing in systemic too! ❤️

Do you think that we can update the tests to reflect this change and prevent regressions in the future?

Thanks in advance!

Hello @UlisesGascon I've updated the PR to include tests covering the new behavior. Thanks for the feedback! 👍

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.

2 participants