Skip to content

Commit

Permalink
Merge pull request #675 from schmidtk/fix-kml-readstyle
Browse files Browse the repository at this point in the history
fix(kml): Ignore Style elements when nothing is parsed.
  • Loading branch information
schmidtk authored Jul 15, 2019
2 parents f08fd89 + 08b2b78 commit a704b4c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/plugin/file/kml/kml.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,8 @@ plugin.file.kml.replaceParsers_(ol.format.KML.POLY_STYLE_PARSERS_, 'color',
plugin.file.kml.readStyle = function(node, objectStack) {
var styleObject = ol.xml.pushParseAndPop(
{}, ol.format.KML.STYLE_PARSERS_, node, objectStack);
if (!styleObject) {
if (!styleObject || goog.object.isEmpty(styleObject)) {
// don't create a style config if nothing was parsed from the element
return null;
}
var fillStyle = /** @type {ol.style.Fill} */
Expand Down

0 comments on commit a704b4c

Please sign in to comment.