2
0
Эх сурвалжийг харах

Add workaround for FireFox creaetImageBitmap() unrecognized options issue in ImageBitmapLoader

Takahiro 6 жил өмнө
parent
commit
a04f8ec4e6

+ 10 - 1
src/loaders/ImageBitmapLoader.js

@@ -71,7 +71,16 @@ ImageBitmapLoader.prototype = {
 
 		} ).then( function ( blob ) {
 
-			return createImageBitmap( blob, scope.options );
+			if ( scope.options === undefined ) {
+
+				// Workaround for FireFox. It causes an error if you pass options.
+				return createImageBitmap( blob );
+
+			} else {
+
+				return createImageBitmap( blob, scope.options );
+
+			}
 
 		} ).then( function ( imageBitmap ) {