@internetarchive/ia-book-actions 0.0.7-13 → 0.0.7-14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@internetarchive/ia-book-actions",
3
- "version": "0.0.7-13",
3
+ "version": "0.0.7-14",
4
4
  "description": "Bookreader actions for borrowable book",
5
5
  "author": "Internet Archive",
6
6
  "license": "AGPL-3.0-only",
@@ -241,7 +241,7 @@ export default class ActionsHandler extends LitElement {
241
241
  async setConsecutiveLoanCounts(action = '') {
242
242
  try {
243
243
  let newCount = 1;
244
- const storageKey = `consecutive-loan-count`;
244
+ const storageKey = `loan-count-${this.identifier}`;
245
245
  const existingCount = await this.localCache.get(storageKey);
246
246
 
247
247
  // increase browse-count by 1 when you consecutive reading a book.
@@ -32,7 +32,7 @@ export class LoanTokenPoller {
32
32
  if (this.borrowType === 'browsed') {
33
33
  try {
34
34
  const existingCount = await this.localCache.get(
35
- 'consecutive-loan-count'
35
+ `loan-count-${this.identifier}`
36
36
  );
37
37
  consecutiveLoanCounts = existingCount ?? 1;
38
38
  } catch (error) {