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

Minor: Force rotateEnabled() to always return a boolean. #1455

Merged
merged 1 commit into from
Feb 15, 2024

Conversation

strfx
Copy link
Contributor

@strfx strfx commented Feb 15, 2024

_rotateEnabled might not yet be initialized when calling rotateEnabled, returning undefined in that case:

return this._rotateEnabled;

Hence converting to boolean first. Adopting this pattern from other places such as layerDragEnabled:

return !!this._layerDragEnabled;

`_rotateEnabled` might not yet be initialized when calling
`rotateEnabled`, returning `undefined` in that case.

Adopting this pattern from other places such as `layerDragEnabled`.
@Falke-Design Falke-Design merged commit d15ba86 into geoman-io:develop Feb 15, 2024
2 checks passed
@Falke-Design
Copy link
Collaborator

Thank you very much!

@strfx
Copy link
Contributor Author

strfx commented Feb 16, 2024

awesome, thank you @Falke-Design for merging!

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