We should replace the if (marker.html) with if (typeof marker.html !== 'undefined') so that it can exists but has no value. This is necessary if you want to style that via an element class.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

yannickoo’s picture

yannickoo’s picture

Status: Active » Needs review
derhasi’s picture

We should not only check that, but implement icon and divIcon in maintainable way. The current code is working with a lot assumptions and little encapsulated code.

derhasi’s picture

In #2178231: Error then use icon from related taxonony term field I posted a patch with a little bit more changes, that will deal better with divIcon.

milesw’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
412 bytes

Thanks for fixing this, yannickoo.

Updated the patch so it applies to dev.

This is trivial fix and should be committed.