Use goog.isDef to check the opt_array param
This commit is contained in:
@@ -95,7 +95,7 @@ ol.Collection = function(opt_array) {
|
|||||||
* @private
|
* @private
|
||||||
* @type {Array.<T>}
|
* @type {Array.<T>}
|
||||||
*/
|
*/
|
||||||
this.array_ = opt_array || [];
|
this.array_ = goog.isDef(opt_array) ? opt_array : [];
|
||||||
|
|
||||||
this.updateLength_();
|
this.updateLength_();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user