Inline simple goog.isDef() calls

This commit is contained in:
Tim Schaub
2015-09-27 10:34:44 -06:00
parent a86c270f6a
commit e3951fa3c6
45 changed files with 172 additions and 170 deletions
+2 -2
View File
@@ -191,7 +191,7 @@ ol.layer.Group.prototype.setLayers = function(layers) {
* @inheritDoc
*/
ol.layer.Group.prototype.getLayersArray = function(opt_array) {
var array = goog.isDef(opt_array) ? opt_array : [];
var array = opt_array !== undefined ? opt_array : [];
this.getLayers().forEach(function(layer) {
layer.getLayersArray(array);
});
@@ -203,7 +203,7 @@ ol.layer.Group.prototype.getLayersArray = function(opt_array) {
* @inheritDoc
*/
ol.layer.Group.prototype.getLayerStatesArray = function(opt_states) {
var states = goog.isDef(opt_states) ? opt_states : [];
var states = opt_states !== undefined ? opt_states : [];
var pos = states.length;