diff --git a/timeliner/resources/js/timelinelistener.js b/timeliner/resources/js/timelinelistener.js index ebcd273..7dc5ec3 100644 --- a/timeliner/resources/js/timelinelistener.js +++ b/timeliner/resources/js/timelinelistener.js @@ -2,6 +2,11 @@ document.addEventListener('DOMContentLoaded', () => { const nodes = document.querySelectorAll('.node'); const dates = []; + if (nodes.length === 0) { + console.warn("No nodes found."); + return; + } + // Gather all milestone dates for range calculation nodes.forEach(node => { const milestones = node.querySelectorAll('.milestone'); diff --git a/timeliner/resources/views/timeline/timeline.blade.php b/timeliner/resources/views/timeline/timeline.blade.php index 4fa9d64..8197d10 100644 --- a/timeliner/resources/views/timeline/timeline.blade.php +++ b/timeliner/resources/views/timeline/timeline.blade.php @@ -17,7 +17,7 @@ @endauth -