Browse Source

Replace .includes with .indexOf

Arseny Kapoulkine 4 years ago
parent
commit
b7707a0634
2 changed files with 2 additions and 2 deletions
  1. 1 1
      examples/js/loaders/GLTFLoader.js
  2. 1 1
      examples/jsm/loaders/GLTFLoader.js

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

@@ -696,7 +696,7 @@ THREE.GLTFLoader = ( function () {
 
 
 		if ( ! loader ) {
 		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' );
 				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 ( ! 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' );
 				throw new Error( 'THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures' );