Browse Source

A dataurl is already a dataurl

gero3 5 năm trước cách đây
mục cha
commit
f06197bb78
1 tập tin đã thay đổi với 5 bổ sung1 xóa
  1. 5 1
      src/extras/ImageUtils.js

+ 5 - 1
src/extras/ImageUtils.js

@@ -12,7 +12,11 @@ const ImageUtils = {
 
 		let canvas;
 
-		if ( typeof HTMLCanvasElement == 'undefined' ) {
+		if ( image.src.startsWith( "data:" ) ) {
+
+			return image.src;
+
+		} else if ( typeof HTMLCanvasElement == 'undefined' ) {
 
 			return image.src;