Use goog.isDef to check the opt_array param

This commit is contained in:
Frederic Junod
2015-01-29 12:00:39 +01:00
parent df32d04fdb
commit 12925a35b9

View File

@@ -95,7 +95,7 @@ ol.Collection = function(opt_array) {
* @private
* @type {Array.<T>}
*/
this.array_ = opt_array || [];
this.array_ = goog.isDef(opt_array) ? opt_array : [];
this.updateLength_();