Browse Source

startswith seems really slow

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

+ 1 - 1
src/extras/ImageUtils.js

@@ -12,7 +12,7 @@ const ImageUtils = {
 
 
 		let canvas;
 		let canvas;
 
 
-		if ( image.src.startsWith( "data:" ) ) {
+		if ( image.src.indexOf( "data:" ) === 0 ) {
 
 
 			return image.src;
 			return image.src;