From 1d1dbb08c9b0fa84da63cd2d381c50bf1869fb5a Mon Sep 17 00:00:00 2001 From: Tom Payne Date: Tue, 17 Dec 2013 01:16:41 +0100 Subject: [PATCH] Use stronger instanceof assertion --- src/ol/format/polylineformat.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ol/format/polylineformat.js b/src/ol/format/polylineformat.js index 2d5ef64eb3..af36338564 100644 --- a/src/ol/format/polylineformat.js +++ b/src/ol/format/polylineformat.js @@ -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);