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

Fix geolocate control crash #934

Merged
merged 5 commits into from Nov 8, 2019
Merged

Fix geolocate control crash #934

merged 5 commits into from Nov 8, 2019

Conversation

xintongxia
Copy link

For #921

@coveralls
Copy link

coveralls commented Nov 5, 2019

Coverage Status

Coverage decreased (-0.02%) to 39.401% when pulling d5d4d5b on xx/fix-geolocate into 41b4cc1 on master.

package.json Outdated Show resolved Hide resolved
@@ -141,6 +141,10 @@ export default class GeolocateControl extends BaseControl<

this._mapboxGeolocateControl = new mapboxgl.GeolocateControl(controlOptions);

if (this._context) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if map is not initialized yet? Check before geolocating?

@xintongxia xintongxia merged commit 27cf6d1 into master Nov 8, 2019
@xintongxia xintongxia deleted the xx/fix-geolocate branch November 8, 2019 05:10
xintongxia pushed a commit that referenced this pull request Nov 8, 2019
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.

None yet

3 participants