Don't use goog.isBoolean()
This commit is contained in:
@@ -116,7 +116,7 @@ ol.DeviceOrientation.prototype.orientationChange_ = function(originalEvent) {
|
||||
var alpha = ol.math.toRadians(event.alpha);
|
||||
this.set(ol.DeviceOrientationProperty.ALPHA, alpha);
|
||||
// event.absolute is undefined in iOS.
|
||||
if (goog.isBoolean(event.absolute) && event.absolute) {
|
||||
if (typeof event.absolute === 'boolean' && event.absolute) {
|
||||
this.set(ol.DeviceOrientationProperty.HEADING, alpha);
|
||||
} else if (goog.isNumber(event.webkitCompassHeading) &&
|
||||
event.webkitCompassAccuracy != -1) {
|
||||
|
||||
@@ -1502,7 +1502,7 @@ ol.Map.createOptionsInternal = function(options) {
|
||||
|
||||
var logos = {};
|
||||
if (options.logo === undefined ||
|
||||
(goog.isBoolean(options.logo) && options.logo)) {
|
||||
(typeof options.logo === 'boolean' && options.logo)) {
|
||||
logos[ol.OL3_LOGO_URL] = ol.OL3_URL;
|
||||
} else {
|
||||
var logo = options.logo;
|
||||
|
||||
@@ -392,10 +392,10 @@ ol.render.canvas.Replay.prototype.replay_ = function(
|
||||
goog.asserts.assert(goog.isNumber(instruction[7]),
|
||||
'8th instruction should be a number');
|
||||
scale = /** @type {number} */ (instruction[7]) * pixelRatio;
|
||||
goog.asserts.assert(goog.isBoolean(instruction[8]),
|
||||
goog.asserts.assert(typeof instruction[8] === 'boolean',
|
||||
'9th instruction should be a boolean');
|
||||
fill = /** @type {boolean} */ (instruction[8]);
|
||||
goog.asserts.assert(goog.isBoolean(instruction[9]),
|
||||
goog.asserts.assert(typeof instruction[9] === 'boolean',
|
||||
'10th instruction should be a boolean');
|
||||
stroke = /** @type {boolean} */ (instruction[9]);
|
||||
for (; d < dd; d += 2) {
|
||||
|
||||
Reference in New Issue
Block a user