瀏覽代碼

Merge pull request #11946 from takahirox/UpdateTextureGetDataURL

Update how to check if argument is canvas in getDataURL() of Texture
Mr.doob 8 年之前
父節點
當前提交
42ce0a7f3b
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/textures/Texture.js

+ 1 - 1
src/textures/Texture.js

@@ -125,7 +125,7 @@ Object.assign( Texture.prototype, EventDispatcher.prototype, {
 
 			var canvas;
 
-			if ( image.toDataURL !== undefined ) {
+			if ( image instanceof HTMLCanvasElement ) {
 
 				canvas = image;