From f9c7cdf928e8068532d2630336a7b08d5085548e Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Wed, 06 Apr 2022 03:44:39 +0000
Subject: [PATCH] fix: check for src before attempting to add popover

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

diff --git a/assets/js/graph.js b/assets/js/graph.js
index 6a63024..f0b1f7f 100644
--- a/assets/js/graph.js
+++ b/assets/js/graph.js
@@ -185,7 +185,7 @@
   const labels = graphNode.append("text")
     .attr("dx", 12)
     .attr("dy", ".35em")
-    .text((d) => content[decodeURI(d.id).replace(/\s+/g, '-')]?.title || d.id.replace("-", " "))
+    .text((d) => content[d.id]?.title || d.id.replace("-", " "))
     .style("opacity", 0)
     .style("pointer-events", "none")
     .call(drag(simulation));

--
Gitblit v1.10.0