瀏覽代碼

Update Texture.js (#25533)

If "source.data" is "undefined ", "source.serializeImage" will report an error, so set the default value to null

Co-authored-by: binggong,x <[email protected]>
xu bg 2 年之前
父節點
當前提交
e523eb3bce
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/textures/Texture.js

+ 1 - 1
src/textures/Texture.js

@@ -83,7 +83,7 @@ class Texture extends EventDispatcher {
 
 	}
 
-	set image( value ) {
+	set image( value = null ) {
 
 		this.source.data = value;