Remove unnecessary goog.isDefAndNotNull() calls

This commit is contained in:
Tim Schaub
2015-09-27 12:06:12 -06:00
parent ed3dcd636f
commit b48cabee28
19 changed files with 46 additions and 57 deletions

View File

@@ -259,7 +259,7 @@ ol.render.canvas.Replay.prototype.replay_ = function(
feature = /** @type {ol.Feature} */ (instruction[1]);
var featureUid = goog.getUid(feature).toString();
if (skippedFeaturesHash[featureUid] !== undefined ||
!goog.isDefAndNotNull(feature.getGeometry())) {
!feature.getGeometry()) {
i = /** @type {number} */ (instruction[2]);
} else if (opt_hitExtent !== undefined && !ol.extent.intersects(
/** @type {Array<number>} */ (opt_hitExtent),
@@ -1728,7 +1728,7 @@ ol.render.canvas.TextReplay.prototype.setTextStyle = function(textStyle) {
var textStrokeStyleMiterLimit = textStrokeStyle.getMiterLimit();
var lineCap = textStrokeStyleLineCap !== undefined ?
textStrokeStyleLineCap : ol.render.canvas.defaultLineCap;
var lineDash = goog.isDefAndNotNull(textStrokeStyleLineDash) ?
var lineDash = textStrokeStyleLineDash ?
textStrokeStyleLineDash.slice() : ol.render.canvas.defaultLineDash;
var lineJoin = textStrokeStyleLineJoin !== undefined ?
textStrokeStyleLineJoin : ol.render.canvas.defaultLineJoin;