瀏覽代碼

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' );