浏览代码

Material: Clean up. (#23438)

linbingquan 3 年之前
父节点
当前提交
9dceefefa1
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      src/materials/Material.js

+ 3 - 3
src/materials/Material.js

@@ -160,9 +160,9 @@ class Material extends EventDispatcher {
 
 	toJSON( meta ) {
 
-		const isRoot = ( meta === undefined || typeof meta === 'string' );
+		const isRootObject = ( meta === undefined || typeof meta === 'string' );
 
-		if ( isRoot ) {
+		if ( isRootObject ) {
 
 			meta = {
 				textures: {},
@@ -370,7 +370,7 @@ class Material extends EventDispatcher {
 
 		}
 
-		if ( isRoot ) {
+		if ( isRootObject ) {
 
 			const textures = extractFromCache( meta.textures );
 			const images = extractFromCache( meta.images );