Skip to content
Snippets Groups Projects
Commit 3f689a32 authored by Luca's avatar Luca
Browse files

Fix 404

parent a7d3ceb2
No related branches found
No related tags found
No related merge requests found
Pipeline #150580 passed
...@@ -76,10 +76,10 @@ ...@@ -76,10 +76,10 @@
const results = fuse.search(pathToSearchFor) const results = fuse.search(pathToSearchFor)
if (results.length !== 0) { if (results.length !== 0) {
const bestShortlink = results[0].item; const bestShortlink = results[0].item;
const bestHref = vanityMap[bestShortlink]; const bestHref = vanityMap['shortlinks'].filter((object) => object.sources.includes(bestShortlink))[0].destination;
document.getElementById("suggestion-text").innerText = "/" + bestShortlink; document.getElementById("suggestion-text").innerText = "/" + bestShortlink;
document.getElementById("suggestion-href").href = "/" + bestHref; document.getElementById("suggestion-href").href = bestHref;
document.getElementById("suggestion-section").classList.remove("is-invisible"); document.getElementById("suggestion-section").classList.remove("is-invisible");
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment