Remove remaining goog.isDefAndNotNull() calls

This commit is contained in:
Tim Schaub
2015-09-29 09:51:41 -06:00
parent 1aca93d297
commit ab87eb8af0
4 changed files with 6 additions and 8 deletions
+2 -2
View File
@@ -60,7 +60,7 @@ ol.source.TileWMS = function(opt_options) {
* @private * @private
* @type {!Array.<string>} * @type {!Array.<string>}
*/ */
this.urls_ = goog.isDefAndNotNull(urls) ? urls : []; this.urls_ = urls || [];
/** /**
* @private * @private
@@ -348,7 +348,7 @@ ol.source.TileWMS.prototype.setUrl = function(url) {
* @api stable * @api stable
*/ */
ol.source.TileWMS.prototype.setUrls = function(urls) { ol.source.TileWMS.prototype.setUrls = function(urls) {
this.urls_ = goog.isDefAndNotNull(urls) ? urls : []; this.urls_ = urls || [];
this.resetCoordKeyPrefix_(); this.resetCoordKeyPrefix_();
this.changed(); this.changed();
}; };
+1 -1
View File
@@ -92,7 +92,7 @@ ol.source.WMTS = function(options) {
* @private * @private
* @type {!Array.<string>} * @type {!Array.<string>}
*/ */
this.urls_ = goog.isDefAndNotNull(urls) ? urls : []; this.urls_ = urls || [];
// FIXME: should we guess this requestEncoding from options.url(s) // FIXME: should we guess this requestEncoding from options.url(s)
// structure? that would mean KVP only if a template is not provided. // structure? that would mean KVP only if a template is not provided.
+2 -4
View File
@@ -275,8 +275,7 @@ ol.View.prototype.getHints = function() {
*/ */
ol.View.prototype.calculateExtent = function(size) { ol.View.prototype.calculateExtent = function(size) {
var center = this.getCenter(); var center = this.getCenter();
goog.asserts.assert(goog.isDefAndNotNull(center), goog.asserts.assert(center, 'The view center is not defined');
'The view center is not defined');
var resolution = this.getResolution(); var resolution = this.getResolution();
goog.asserts.assert(resolution !== undefined, goog.asserts.assert(resolution !== undefined,
'The view resolution is not defined'); 'The view resolution is not defined');
@@ -552,8 +551,7 @@ ol.View.prototype.centerOn = function(coordinate, size, position) {
* @return {boolean} Is defined. * @return {boolean} Is defined.
*/ */
ol.View.prototype.isDef = function() { ol.View.prototype.isDef = function() {
return goog.isDefAndNotNull(this.getCenter()) && return !!this.getCenter() && this.getResolution() !== undefined;
this.getResolution() !== undefined;
}; };
+1 -1
View File
@@ -136,7 +136,7 @@ ol.xml.getLocalNameIE_ = function(node) {
return localName; return localName;
} }
var baseName = node.baseName; var baseName = node.baseName;
goog.asserts.assert(goog.isDefAndNotNull(baseName), goog.asserts.assert(baseName,
'Failed to get localName/baseName of node %s', node); 'Failed to get localName/baseName of node %s', node);
return baseName; return baseName;
}; };