Use stronger instanceof assertion
This commit is contained in:
@@ -395,7 +395,7 @@ ol.format.Polyline.prototype.writeFeaturesText = function(features) {
|
|||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.format.Polyline.prototype.writeGeometryText = function(geometry) {
|
ol.format.Polyline.prototype.writeGeometryText = function(geometry) {
|
||||||
goog.asserts.assert(geometry.getType() == ol.geom.GeometryType.LINE_STRING);
|
goog.asserts.assertInstanceof(geometry, ol.geom.LineString);
|
||||||
var flatCoordinates = geometry.getFlatCoordinates();
|
var flatCoordinates = geometry.getFlatCoordinates();
|
||||||
var stride = geometry.getStride();
|
var stride = geometry.getStride();
|
||||||
return ol.format.Polyline.encodeFlatCoordinates(flatCoordinates, stride);
|
return ol.format.Polyline.encodeFlatCoordinates(flatCoordinates, stride);
|
||||||
|
|||||||
Reference in New Issue
Block a user