Skip to content

Commit

Permalink
Fix analytics error when contents item selected (#785)
Browse files Browse the repository at this point in the history
If the contents item doesn't specify a book collection, analytics callback logging history failed with unfilled promise error
  • Loading branch information
davidmoore1 authored and aidanpscott committed Jan 27, 2025
1 parent 0d2c527 commit e7a7716
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/routes/contents/[id]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,12 @@
}
function getReference(item) {
let docSet;
let collection;
let docSet = $refs.docSet;
let collection = docSet.split('_')[1];
let book;
let chapter;
let verse;
const reference = item.linkTarget.split('.');
if (item.layoutMode && item.layoutCollection?.length > 0) {
/*
Note: have not handled layout modes
Expand Down

0 comments on commit e7a7716

Please sign in to comment.