Merge pull request #5959 from ahocevar/getlayer-no-assert
Remove unnecessary and misleading assertion
This commit is contained in:
@@ -1,10 +1,8 @@
|
|||||||
goog.provide('ol.interaction.Select');
|
goog.provide('ol.interaction.Select');
|
||||||
|
|
||||||
goog.require('ol');
|
goog.require('ol');
|
||||||
goog.require('ol.asserts');
|
|
||||||
goog.require('ol.functions');
|
goog.require('ol.functions');
|
||||||
goog.require('ol.Collection');
|
goog.require('ol.Collection');
|
||||||
goog.require('ol.Feature');
|
|
||||||
goog.require('ol.array');
|
goog.require('ol.array');
|
||||||
goog.require('ol.events');
|
goog.require('ol.events');
|
||||||
goog.require('ol.events.Event');
|
goog.require('ol.events.Event');
|
||||||
@@ -172,8 +170,6 @@ ol.interaction.Select.prototype.getFeatures = function() {
|
|||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
ol.interaction.Select.prototype.getLayer = function(feature) {
|
ol.interaction.Select.prototype.getLayer = function(feature) {
|
||||||
ol.asserts.assert(feature instanceof ol.Feature,
|
|
||||||
42); // Expected an `ol.Feature`, but got an `ol.RenderFeature`
|
|
||||||
var key = ol.getUid(feature);
|
var key = ol.getUid(feature);
|
||||||
return /** @type {ol.layer.Vector} */ (this.featureLayerAssociation_[key]);
|
return /** @type {ol.layer.Vector} */ (this.featureLayerAssociation_[key]);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user