Fix svg matching performance issue

This commit is contained in:
MoyuScript
2014-11-02 18:54:39 +02:00
parent 5a7fd30049
commit 36e380437d
3 changed files with 3 additions and 3 deletions

View File

@ -76,7 +76,7 @@ ImageLoader.prototype.loadImage = function(imageData) {
};
ImageLoader.prototype.isSVG = function(src) {
return (/(.+).svg$/i.test(src)) || SVGContainer.prototype.isInline(src);
return src.substring(src.length - 3).toLowerCase() === "svg" || SVGContainer.prototype.isInline(src);
};
ImageLoader.prototype.imageExists = function(images, src) {