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 years ago
parent
commit
e523eb3bce
1 changed files with 1 additions and 1 deletions
  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;