Skip to content

Commit

Permalink
Fix file information link displaying when no information is available
Browse files Browse the repository at this point in the history
  • Loading branch information
pcprince committed Nov 25, 2024
1 parent 45d7a50 commit 0a870ac
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions scripts/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* June 2022
*****************************************************************************/

// TODO: Update this with changes, along with the version in worker.js
const VERSION = 3;
// TODO: Update this with changes
const VERSION = 4;

/* Regex used to extract timestamp from header comment */

Expand Down
2 changes: 1 addition & 1 deletion scripts/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ async function displaySpans (index) {
artistSpan.innerText = artist;
commentSpan.innerText = comment;

if (artist !== '' || comment !== '' || guanoData) fileInformationLink.style.display = '';
if (artist !== '' || comment !== '' || guanoData.length !== 0) fileInformationLink.style.display = '';

artistSpan.style.display = (artist === '') ? 'none' : '';
commentSpan.style.display = (comment === '') ? 'none' : '';
Expand Down
3 changes: 2 additions & 1 deletion worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@

/* global self, caches, fetch */

const VERSION = '3';
// TODO: Update this with changes
const VERSION = '4';
const cacheName = 'audiomothplay-v' + VERSION;

self.addEventListener('install', (e) => {
Expand Down

0 comments on commit 0a870ac

Please sign in to comment.