@cornerstonejs/core 0.41.0 → 0.41.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cornerstonejs/core",
3
- "version": "0.41.0",
3
+ "version": "0.41.1",
4
4
  "description": "",
5
5
  "main": "dist/umd/index.js",
6
6
  "types": "dist/esm/index.d.ts",
@@ -51,5 +51,5 @@
51
51
  "type": "individual",
52
52
  "url": "https://ohif.org/donate"
53
53
  },
54
- "gitHead": "91c274e60d136f3470eace8c04bf2216df0a06ed"
54
+ "gitHead": "8e8c4693642dab1c46c38381f66730b40b187e79"
55
55
  }
package/src/init.ts CHANGED
@@ -49,18 +49,10 @@ function _getGLContext(): RenderingContext {
49
49
  function _hasActiveWebGLContext() {
50
50
  const gl = _getGLContext();
51
51
 
52
- // Report the result.
53
- if (gl && (gl as WebGL2RenderingContext).getExtension) {
54
- const ext = (gl as WebGL2RenderingContext).getExtension(
55
- 'EXT_texture_norm16'
56
- );
57
-
58
- if (ext) {
59
- return true;
60
- }
61
- }
62
-
63
- return false;
52
+ // Check if the context is either WebGLRenderingContext or WebGL2RenderingContext
53
+ return (
54
+ gl instanceof WebGLRenderingContext || gl instanceof WebGL2RenderingContext
55
+ );
64
56
  }
65
57
 
66
58
  function hasSharedArrayBuffer() {