From 037426217c5bee94f7c619f62e63d71c1f31b5bb Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Tue, 03 May 2022 16:29:26 +0000
Subject: [PATCH] Merge pull request #122 from aidenybai/fix-active-graph-node

---
 assets/js/graph.js |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/assets/js/graph.js b/assets/js/graph.js
index c5829e9..db1cfe2 100644
--- a/assets/js/graph.js
+++ b/assets/js/graph.js
@@ -1,5 +1,4 @@
 async function drawGraph(
-  url,
   baseUrl,
   pathColors,
   depth,
@@ -10,7 +9,7 @@
   const container = document.getElementById('graph-container')
 
   const { index, links, content } = await fetchData
-  const curPage = url.replace(baseUrl, '')
+  const curPage = window.location.href.replace(baseUrl, "").replace(/\/$/g, "")
 
   const parseIdsFromLinks = (links) => [
     ...new Set(links.flatMap((link) => [link.source, link.target])),

--
Gitblit v1.10.0