Get rid of goog.isArrayLike

With this change, it's no longer possible to extend an array with
an "array like" object (an object with a 'length' property).
We were not using this feature in the library.
This commit is contained in:
Frederic Junod
2016-07-04 16:17:33 +02:00
parent b5da32340e
commit 89e377cb48
2 changed files with 1 additions and 27 deletions

View File

@@ -187,7 +187,7 @@ ol.array.flatten = function(arr) {
*/
ol.array.extend = function(arr, data) {
var i;
var extension = goog.isArrayLike(data) ? data : [data];
var extension = Array.isArray(data) ? data : [data];
var length = extension.length;
for (i = 0; i < length; i++) {
arr[arr.length] = extension[i];