Use explicit regex for trailing slash trim
This commit is contained in:
		
							parent
							
								
									8d092a3a4a
								
							
						
					
					
						commit
						e646cdb0be
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -9,7 +9,7 @@ async function drawGraph(
 | 
			
		|||
  const container = document.getElementById('graph-container')
 | 
			
		||||
 | 
			
		||||
  const { index, links, content } = await fetchData
 | 
			
		||||
  const curPage = window.location.href.replace(baseUrl, '').slice(0, -1)
 | 
			
		||||
  const curPage = window.location.href.replace(baseUrl, "").replace(/\/$/g, "")
 | 
			
		||||
 | 
			
		||||
  const parseIdsFromLinks = (links) => [
 | 
			
		||||
    ...new Set(links.flatMap((link) => [link.source, link.target])),
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue