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
[FE-7750] Fix inconsistent display of mapbox logo / watermark #302
[FE-7750] Fix inconsistent display of mapbox logo / watermark #302
Conversation
src/mixins/map-mixin.js
Outdated
@@ -277,8 +277,9 @@ export default function mapMixin( | |||
mapboxlogo.target = "_blank" | |||
mapboxlogo.innerHTML = "Mapbox" | |||
|
|||
const existingLogo = document.getElementsByClassName('mapbox-maplogo') | |||
if(existingLogo.length ) { | |||
const thisMapContainer = _map._container |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How certain are we _map
will never still be null here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added check for null _map
src/mixins/map-mixin.js
Outdated
const existingLogo = document.getElementsByClassName('mapbox-maplogo') | ||
if(existingLogo.length ) { | ||
const thisMapContainer = _map._container | ||
const existingLogo = thisMapContainer.querySelectorAll('.mapbox-maplogo') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like we could easily just use querySelector
instead here, but unlikely to matter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed because querySelector
is better style
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Merge Checklist
馃敡 Issue(s) fixed:
馃毈 Smoke Test
馃殺 Merge