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
Contacts, photos property doesn't work with null value #737
Comments
A bit more info - basically the issue is that the TS file knows it is an array, but doesn't accept that it may be null too. |
So I removed readonly on the photos prop from the TS file and was able to get stuff working. :) |
You can't just set it to '[]' ? |
Nope. You get an error. That goes away when readonly is removed. |
This should be fixed by #635 |
Thanks. Any idea when this PR will get pulled in? |
@cfjedimaster The next goal is 2.2.5 with some bug fixes, then I will merge that PR along with #422 and publish 2.3.0. So it shouldn't take long. |
Ok, do you mind a dumb question? My code is doing this when a contact has no photos:
Will that work - specifically setting it to an empty array? I mean it works now with my hack (removing readonly), but your proper fix is a bit different. |
@cfjedimaster Should be fixed now! Please update to v2.2.10 and let me know if you're still having any issues. |
Thanks! |
Given a contact instance, I'm not allowed to set the photos property to a new array to work with a contact that has no photos. So this,
doesn't validate in TypeScript. @mhartington thinks it may be an issue in the TS definition fie.
The text was updated successfully, but these errors were encountered: