Skip to content

Commit

Permalink
ts
Browse files Browse the repository at this point in the history
  • Loading branch information
Liza K committed Apr 13, 2021
1 parent 07423c1 commit eb4147b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export class EnhancedSearchInterceptor extends SearchInterceptor {
savedToBackgroundSub.unsubscribe();
}
}),
// This observable is cached in the responseCache.
// This observable is cached in the responseCache.
// Using shareReplay makes sure that future subscribers will get the final response

shareReplay(1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export class SearchResponseCache {
response$.subscribe({
next: (r) => {
// TODO: avoid stringiying. Get the size some other way!
const newSize = (new Blob([JSON.stringify(r)])).size;
const newSize = new Blob([JSON.stringify(r)]).size;
if (this.byteToMb(newSize) < this.maxCacheSizeMB && !isErrorResponse(r)) {
this.setItem(key, {
...cacheItem,
Expand Down

0 comments on commit eb4147b

Please sign in to comment.