Skip to content

Commit b0c7449

Browse files
author
Saurabh Kumar Bajpai
committed
fix: resolve 4 bugs in BiblioDrift
1 parent af173a5 commit b0c7449

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎frontend/js/community-stories.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ document.addEventListener('DOMContentLoaded', () => {
4949
}
5050
];
5151

52-
let stories = JSON.parse(localStorage.getItem('bibliodrift_community_stories')) || defaultStories;
52+
let stories = (JSON.parse(localStorage.getItem('bibliodrift_community_stories') ?? "null") ?? null) || defaultStories;
5353

5454
// Save to local storage
5555
const saveStories = () => {

‎frontend/js/db.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
async function getPendingLibrarySyncCount(userId) {
1414
if (!window.db?.syncQueue) return 0;
15-
if (userId == null) {
15+
if (userId === null) {
1616
return await window.db.syncQueue.count();
1717
}
1818
return await window.db.syncQueue.where('userId').equals(userId).count();

‎frontend/js/landing-contributors.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,6 @@
334334
}
335335

336336
refreshContributorSource(false);
337-
setInterval(()=> refreshContributorSource(true), REFRESH_INTERVAL_MS);
337+
clearInterval(window.__interval); window.__interval = setInterval(()=> refreshContributorSource(true), REFRESH_INTERVAL_MS);
338338
});
339339
})();

‎frontend/js/nearby-bookstores.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ function handleLocationSuccess(position) {
142142
const longitude =
143143
position.coords.longitude;
144144

145-
locationStatus.innerHTML = `
145+
locationStatus.textContent = `
146146
147147
<span class="location-success">
148148

0 commit comments

Comments
 (0)