From 7759e54fd45666ff6214ee711c704def4aca3ff6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Fri, 13 Sep 2019 15:31:15 +0200 Subject: [PATCH] Correct hashtag link routing --- webapp/middleware/searchHashtag.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webapp/middleware/searchHashtag.js b/webapp/middleware/searchHashtag.js index a1bdda7e9..ed2b62de0 100644 --- a/webapp/middleware/searchHashtag.js +++ b/webapp/middleware/searchHashtag.js @@ -8,9 +8,9 @@ export default async ({ store, env, route, redirect }) => { } const regX = build('^/search/hashtag/((\\pL+[\\pL0-9]*)|([0-9]+\\pL+[\\pL0-9]*))$') - const matchHashtag = exec(decodeURI(route.name), regX) + const matchHashtag = route.fullPath ? exec(decodeURI(route.fullPath), regX) : null if (!matchHashtag) return true - return redirect(`/?hashtag=${encodeURI(matchHashtag[0])}`) + return redirect(`/?hashtag=${encodeURI(matchHashtag[1])}`) }