Skip to content

Commit

Permalink
Handle src undefined case when looking up local cache.
Browse files Browse the repository at this point in the history
  • Loading branch information
kpdecker committed Feb 3, 2011
1 parent e818f8b commit 057df95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion user-image-cache.js
Expand Up @@ -123,7 +123,7 @@ var UserImageCache;
var match = /^page-store:\/\/(.*)$/.exec(file);
if (this.isLocalSupported() && match) {
curEntry = localDataBinding.getImage(match[1]);
if (!curEntry) {
if (!curEntry || !curEntry.src) {
// We could not find the cache data. This could be due to a refresh in the local case,
// or due to someone attempting to paste a URL that uses a local reference.
onError && onError(UserImageCache.NOT_FOUND);
Expand Down

0 comments on commit 057df95

Please sign in to comment.