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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

AutoPath doesn't error on non-existent property #228

Open
nkalpak opened this issue Apr 11, 2021 · 5 comments
Open

AutoPath doesn't error on non-existent property #228

nkalpak opened this issue Apr 11, 2021 · 5 comments
Labels
bug Something isn't working enhancement Improving something

Comments

@nkalpak
Copy link

nkalpak commented Apr 11, 2021

馃悶 Bug Report

Describe the bug

The documentation for AutoPath provides two use-cases that should work, and two that should error.
The two use-cases that should produce a type error, don't do so.

I have also tried passing a completely bogus, non-dotted path (line 35 in the sandbox), and there is no error produced (is this working as intended? should AutoPath only work with dotted paths?).

Reproduce the bug

https://codesandbox.io/s/peaceful-leftpad-lbwbg?file=/src/index.ts

Check lines 31, 32, 35

Expected behavior

AutoPath should produce a type error

@millsp millsp added bug Something isn't working enhancement Improving something labels Apr 12, 2021
@millsp
Copy link
Owner

millsp commented Apr 12, 2021

Thanks for reporting this. I should add a check on undefined values.

@jessetabak
Copy link

Actually, if you rollback to version 9.3.10 it works as expected. (You can check it in the codesandbox from above)

@stale
Copy link

stale bot commented Jun 20, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Jun 20, 2021
@stale stale bot closed this as completed Jun 29, 2021
@OmgImAlexis
Copy link

Bad bot.

@millsp millsp reopened this Sep 3, 2021
@stale stale bot removed the wontfix This will not be worked on label Sep 3, 2021
@omerman
Copy link

omerman commented Dec 9, 2021

This is a duplication for #276
If you will change the User type name field to be number, like such:

https://codesandbox.io/s/practical-wildflower-8uegn?file=/src/index.ts

It will work properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement Improving something
Projects
None yet
Development

No branches or pull requests

5 participants