Browse Source

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 năm trước cách đây
mục cha
commit
e523eb3bce
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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;