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

Inconsistent null-aware behaviour in moveAndRotate #1002

Closed
OfficiallySomeGuy opened this issue Aug 29, 2021 · 4 comments
Closed

Inconsistent null-aware behaviour in moveAndRotate #1002

OfficiallySomeGuy opened this issue Aug 29, 2021 · 4 comments

Comments

@OfficiallySomeGuy
Copy link
Contributor

Noticed this minor issue that I have patched locally -- id is marked (I believe correctly) as an optional parameter, however the null-aware ! operator is then used to perform a null-check.

In the underlying move and rotate functions, id is not mandatory, and as a keyword arg it seems sensible that this operator were not used in this context.

Surely in this case, we should either enforce id as a required parameter everywhere, or, in my view preferably, remove the null-safe check.

source: MapEventSource.mapController, id: id!);

Will open a PR, but opening this issue also for discussion, as not entirely familiar with the codebase.

@JaffaKetchup
Copy link
Member

This has been causing issues for me too ("null check operator used on null value"), and as id should be optional, your PR is the right way of doing things, I think.

@tlueder
Copy link
Contributor

tlueder commented Sep 9, 2021

Same for me, this broke my app and it took me a while to find the cause.

johnpryan pushed a commit that referenced this issue Sep 13, 2021
* Remove inappropriate null-aware checking

See issue #1002

* Change underlying state property
@github-actions
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Oct 10, 2021
@OfficiallySomeGuy
Copy link
Contributor Author

Resolved in #1022

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

No branches or pull requests

3 participants