Skip to content

Commit

Permalink
make lint happy
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewharvey committed Apr 7, 2018
1 parent 087ab90 commit cc6f7b1
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/ui/control/logo_control.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,14 @@ class LogoControl {
}

_updateCompact() {
if (this._map.getCanvasContainer().offsetWidth < 250) {
this._container.children.length && this._container.children[0].classList.add('mapboxgl-compact');
} else {
this._container.children.length && this._container.children[0].classList.remove('mapboxgl-compact');
const containerChildren = this._container.children;
if (containerChildren.length) {
const anchor = children[0];
if (this._map.getCanvasContainer().offsetWidth < 250) {
anchor.classList.add('mapboxgl-compact');
} else {
anchor.classList.remove('mapboxgl-compact');
}
}
}

Expand Down

0 comments on commit cc6f7b1

Please sign in to comment.