Skip to content

Commit

Permalink
_updateLogo onAdd
Browse files Browse the repository at this point in the history
  • Loading branch information
Molly Lloyd committed Jun 20, 2017
1 parent 6103072 commit 8d5fcaf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ui/control/logo_control.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class LogoControl {
this._container.style.display = 'none';

this._map.on('sourcedata', this._updateLogo);
this._updateLogo();
return this._container;
}

Expand All @@ -42,7 +43,7 @@ class LogoControl {
}

_updateLogo(e) {
if (e && e.sourceDataType === 'metadata') {
if (!e || e.sourceDataType === 'metadata') {
this._container.style.display = this._logoRequired() ? 'block' : 'none';
}
}
Expand Down

0 comments on commit 8d5fcaf

Please sign in to comment.