diff --git a/src/objectliterals.jsdoc b/src/objectliterals.jsdoc index 41930724ac..722358a6ce 100644 --- a/src/objectliterals.jsdoc +++ b/src/objectliterals.jsdoc @@ -620,7 +620,7 @@ /** * @typedef {Object} ol.style.FillOptions - * @property {ol.Color|string} color Color. + * @property {ol.Color|string|undefined} color Color. * @todo stability experimental */ diff --git a/src/ol/style/fillstyle.js b/src/ol/style/fillstyle.js index 5c6a040da5..38269f5c3a 100644 --- a/src/ol/style/fillstyle.js +++ b/src/ol/style/fillstyle.js @@ -13,7 +13,7 @@ ol.style.Fill = function(options) { /** * @type {ol.Color|string} */ - this.color = options.color; + this.color = goog.isDef(options.color) ? options.color : null; };