Use ol.isDef in assertion
This addresses comment https://github.com/openlayers/ol3/commit/e558b5db639065fa0a7e41012cb9fa2fde7c41d5#commitcomment-13406867 by @elemoine.
This commit is contained in:
@@ -140,7 +140,7 @@ ol.renderer.Map.prototype.forEachFeatureAtCoordinate =
|
|||||||
* @return {?} Callback result.
|
* @return {?} Callback result.
|
||||||
*/
|
*/
|
||||||
function forEachFeatureAtCoordinate(feature) {
|
function forEachFeatureAtCoordinate(feature) {
|
||||||
goog.asserts.assert(feature !== undefined, 'received a feature');
|
goog.asserts.assert(ol.isDef(feature), 'received a feature');
|
||||||
var key = goog.getUid(feature).toString();
|
var key = goog.getUid(feature).toString();
|
||||||
if (!(key in features)) {
|
if (!(key in features)) {
|
||||||
features[key] = true;
|
features[key] = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user