Use stronger instanceof assertion

This commit is contained in:
Tom Payne
2013-12-17 01:16:41 +01:00
parent ed332dba19
commit 1d1dbb08c9

View File

@@ -395,7 +395,7 @@ ol.format.Polyline.prototype.writeFeaturesText = function(features) {
* @inheritDoc
*/
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 stride = geometry.getStride();
return ol.format.Polyline.encodeFlatCoordinates(flatCoordinates, stride);