Преглед на файлове

Replace .includes with .indexOf

Arseny Kapoulkine преди 4 години
родител
ревизия
b7707a0634
променени са 2 файла, в които са добавени 2 реда и са изтрити 2 реда
  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 ( 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' );