Selaa lähdekoodia

startswith seems really slow

gero3 5 vuotta sitten
vanhempi
commit
5b7c025193
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      src/extras/ImageUtils.js

+ 1 - 1
src/extras/ImageUtils.js

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