@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
|
@@ -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 = `
|
|
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
|
-
|
|
35
|
+
`loan-count-${this.identifier}`
|
|
36
36
|
);
|
|
37
37
|
consecutiveLoanCounts = existingCount ?? 1;
|
|
38
38
|
} catch (error) {
|