Skip to content

Commit

Permalink
implement pr feedback
Browse files Browse the repository at this point in the history
- [CORE-1121]
  • Loading branch information
Tobias Winkler committed Mar 12, 2020
1 parent 1bf5fbd commit 49cad24
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/app/ipfs-cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,6 @@ export class IPFSCache {
// do nothing
}
}
} else if (ex.number === -2147024882) {
// Internet Explorer 8
quotaExceeded = true;
}
}

Expand Down Expand Up @@ -108,7 +105,12 @@ export class IPFSCache {
* Close the current db, delete the previous one and create a new one.
*/
private async recreateDb(): Promise<void> {
if (!this.db) {
return;
}

log('[ipfs-cache] recreate ipfs db - maybe aborted?');

// close previous db
await (await this.getOpenedDb()).close();

Expand All @@ -132,7 +134,7 @@ export class IPFSCache {
* @param {string} hash ipfs hash to store the data for
* @param {any} data data to store for the ipfs hash
*/
async add(hash: string, data: any): Promise<any> {
async add(hash: string, data: any): Promise<void> {
return this.set(hash, data);
}

Expand Down

0 comments on commit 49cad24

Please sign in to comment.