use a more strict check for opt_nonGeometry

This commit is contained in:
Bart van den Eijnden
2013-11-19 15:41:40 +01:00
parent 8d03fa1197
commit 89cac657dc

View File

@@ -81,7 +81,7 @@ ol.Feature.prototype.getAttributes = function(opt_nonGeometry) {
for (i = 0; i < len; ++ i) {
key = keys[i];
var value = this.get(key);
if (!goog.isDef(opt_nonGeometry) || opt_nonGeometry == false ||
if (!goog.isDef(opt_nonGeometry) || opt_nonGeometry === false ||
(opt_nonGeometry === true && !(value instanceof ol.geom.Geometry))) {
attributes[key] = value;
}