From dbc4f4e6214428d10e51c8349bc627d22c92d43d Mon Sep 17 00:00:00 2001 From: Tom Payne Date: Sun, 23 Mar 2014 19:45:28 +0100 Subject: [PATCH] Use ol.array.safeExtend in ol.geom.Polygon --- src/ol/geom/polygon.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ol/geom/polygon.js b/src/ol/geom/polygon.js index 1ab9f13818..f3694430be 100644 --- a/src/ol/geom/polygon.js +++ b/src/ol/geom/polygon.js @@ -2,6 +2,7 @@ goog.provide('ol.geom.Polygon'); goog.require('goog.array'); goog.require('goog.asserts'); +goog.require('ol.array'); goog.require('ol.extent'); goog.require('ol.geom.GeometryType'); goog.require('ol.geom.LinearRing'); @@ -85,7 +86,7 @@ ol.geom.Polygon.prototype.appendLinearRing = function(linearRing) { if (goog.isNull(this.flatCoordinates)) { this.flatCoordinates = linearRing.getFlatCoordinates().slice(); } else { - goog.array.extend(this.flatCoordinates, linearRing.getFlatCoordinates()); + ol.array.safeExtend(this.flatCoordinates, linearRing.getFlatCoordinates()); } this.ends_.push(this.flatCoordinates.length); this.dispatchChangeEvent();