Skip to content

Commit

Permalink
Check if an con is null before setting the opacity (#6610)
Browse files Browse the repository at this point in the history
  • Loading branch information
charlie67 authored and mourner committed Apr 22, 2019
1 parent c41a8d6 commit a3d4cfb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/layer/marker/Marker.js
Expand Up @@ -339,7 +339,9 @@ export var Marker = Layer.extend({
_updateOpacity: function () {
var opacity = this.options.opacity;

DomUtil.setOpacity(this._icon, opacity);
if (this._icon) {
DomUtil.setOpacity(this._icon, opacity);
}

if (this._shadow) {
DomUtil.setOpacity(this._shadow, opacity);
Expand Down

0 comments on commit a3d4cfb

Please sign in to comment.