Remove goog.isNull in has class
This commit is contained in:
+2
-2
@@ -41,7 +41,7 @@ ol.has.CANVAS = ol.ENABLE_CANVAS && (
|
|||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
var context = ol.dom.createCanvasContext2D();
|
var context = ol.dom.createCanvasContext2D();
|
||||||
if (goog.isNull(context)) {
|
if (!context) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
if (context.setLineDash !== undefined) {
|
if (context.setLineDash !== undefined) {
|
||||||
@@ -129,7 +129,7 @@ ol.has.WEBGL;
|
|||||||
var gl = ol.webgl.getContext(canvas, {
|
var gl = ol.webgl.getContext(canvas, {
|
||||||
failIfMajorPerformanceCaveat: true
|
failIfMajorPerformanceCaveat: true
|
||||||
});
|
});
|
||||||
if (!goog.isNull(gl)) {
|
if (gl) {
|
||||||
hasWebGL = true;
|
hasWebGL = true;
|
||||||
textureSize = /** @type {number} */
|
textureSize = /** @type {number} */
|
||||||
(gl.getParameter(gl.MAX_TEXTURE_SIZE));
|
(gl.getParameter(gl.MAX_TEXTURE_SIZE));
|
||||||
|
|||||||
Reference in New Issue
Block a user