Explorar o código

fix typeof check

Alexander Rose %!s(int64=3) %!d(string=hai) anos
pai
achega
33de60d365
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      src/mol-gl/webgl/texture.ts

+ 2 - 2
src/mol-gl/webgl/texture.ts

@@ -169,7 +169,7 @@ export function getAttachment(gl: GLRenderingContext, extensions: WebGLExtension
 }
 
 function isImage(x: TextureImage<any> | TextureVolume<any> | HTMLImageElement): x is HTMLImageElement {
-    return typeof HTMLImageElement !== undefined && (x instanceof HTMLImageElement);
+    return typeof HTMLImageElement !== 'undefined' && (x instanceof HTMLImageElement);
 }
 
 function isTexture2d(x: TextureImage<any> | TextureVolume<any>, target: number, gl: GLRenderingContext): x is TextureImage<any> {
@@ -441,4 +441,4 @@ export function createNullTexture(gl?: GLRenderingContext): Texture {
         reset: () => {},
         destroy: () => {},
     };
-}
+}