Inline simple !goog.isDef() checks

This commit is contained in:
Tim Schaub
2015-09-27 10:23:30 -06:00
parent b36d697585
commit 6638ae855d
14 changed files with 27 additions and 27 deletions

View File

@@ -485,7 +485,7 @@ ol.render.canvas.Immediate.prototype.drawFeature = function(feature, style) {
return;
}
var zIndex = style.getZIndex();
if (!goog.isDef(zIndex)) {
if (zIndex === undefined) {
zIndex = 0;
}
this.drawAsync(zIndex, function(render) {

View File

@@ -1919,12 +1919,12 @@ ol.render.canvas.ReplayGroup.prototype.getReplay =
function(zIndex, replayType) {
var zIndexKey = goog.isDef(zIndex) ? zIndex.toString() : '0';
var replays = this.replaysByZIndex_[zIndexKey];
if (!goog.isDef(replays)) {
if (replays === undefined) {
replays = {};
this.replaysByZIndex_[zIndexKey] = replays;
}
var replay = replays[replayType];
if (!goog.isDef(replay)) {
if (replay === undefined) {
var Constructor = ol.render.canvas.BATCH_CONSTRUCTORS_[replayType];
goog.asserts.assert(goog.isDef(Constructor),
replayType +