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

Replace .includes with .indexOf

Arseny Kapoulkine 4 жил өмнө
parent
commit
b7707a0634

+ 1 - 1
examples/js/loaders/GLTFLoader.js

@@ -696,7 +696,7 @@ THREE.GLTFLoader = ( function () {
 
 		if ( ! loader ) {
 
-			if ( json.extensionsRequired && json.extensionsRequired.includes( this.name ) ) {
+			if ( json.extensionsRequired && json.extensionsRequired.indexOf( this.name ) >= 0 ) {
 
 				throw new Error( 'THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures' );
 

+ 1 - 1
examples/jsm/loaders/GLTFLoader.js

@@ -759,7 +759,7 @@ var GLTFLoader = ( function () {
 
 		if ( ! loader ) {
 
-			if ( json.extensionsRequired && json.extensionsRequired.includes( this.name ) ) {
+			if ( json.extensionsRequired && json.extensionsRequired.indexOf( this.name ) >= 0 ) {
 
 				throw new Error( 'THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures' );