From 12925a35b9c962a243046cab7d0d520186f757c3 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Thu, 29 Jan 2015 12:00:39 +0100 Subject: [PATCH] Use goog.isDef to check the opt_array param --- src/ol/collection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ol/collection.js b/src/ol/collection.js index 77acfc6c9e..dacf2f3551 100644 --- a/src/ol/collection.js +++ b/src/ol/collection.js @@ -95,7 +95,7 @@ ol.Collection = function(opt_array) { * @private * @type {Array.} */ - this.array_ = opt_array || []; + this.array_ = goog.isDef(opt_array) ? opt_array : []; this.updateLength_();