2
0
Эх сурвалжийг харах

GLTFExporter: Check for document before creating OffscreenCanvas

Robert Long 3 жил өмнө
parent
commit
5942bd4c82

+ 1 - 1
examples/jsm/exporters/GLTFExporter.js

@@ -347,7 +347,7 @@ function getCanvas() {
 
 	}
 
-	if ( typeof OffscreenCanvas !== 'undefined' ) {
+	if ( typeof document === 'undefined' && typeof OffscreenCanvas !== 'undefined' ) {
 
 		cachedCanvas = new OffscreenCanvas( 1, 1 );