Skip to content

Commit

Permalink
fix(image-loader): ignore errors when maintaining cache size
Browse files Browse the repository at this point in the history
  • Loading branch information
ihadeed committed Mar 22, 2017
1 parent f37f1e9 commit 4c14ee6
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/providers/image-loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -354,12 +354,7 @@ export class ImageLoader {
// delete the file then process next file if necessary
this.file.removeFile(this.file.cacheDirectory + this.config.cacheDirectoryName, file.name)
.then(() => next())
.catch((e: FileError) => {
next();
if (e.code != 1) { // ignore File not found error
this.throwError('Error deleting file from cache to maintain size. ', e)
}
});
.catch(() => next()); // ignore errors, nothing we can do about it
}
};

Expand Down

0 comments on commit 4c14ee6

Please sign in to comment.