From 166196b354b4360a0ba622f854d100903cd838c0 Mon Sep 17 00:00:00 2001 From: fvicente Date: Mon, 18 Jan 2016 09:11:05 -0200 Subject: [PATCH] Fix for dest.fullPath undefined. Syntax inside the replace looks strange, but I won't change it since is not my code nor the issue I'm facing now. --- angular-imgcache.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/angular-imgcache.js b/angular-imgcache.js index 68172d4..68b6aa0 100644 --- a/angular-imgcache.js +++ b/angular-imgcache.js @@ -48,7 +48,7 @@ angular.module('ImgCache', []) var setImg = function(type, el, src) { ImgCache.getCachedFileURL(src, function(src, dest) { - var img_src = dest.fullPath.replace('/'. ImgCache.options.localCacheFolder, ImgCache.getCacheFolderURI()); + var img_src = (dest.fullPath) ? dest.fullPath.replace('/'. ImgCache.options.localCacheFolder, ImgCache.getCacheFolderURI()) : dest; if(type === 'bg') { el.css({'background-image': 'url(' + img_src + ')' }); } else {