From c25d472ce7ee6c8008c9a9a9a50e2090d2c627d6 Mon Sep 17 00:00:00 2001 From: LukasSkywalker Date: Tue, 11 Jun 2024 16:31:32 +0200 Subject: [PATCH] HAS-25: Only remove ArticleID query parameter Removing all query parameters has the side effect, that the query text on the search page is removed as well, which breaks the search. This change only removes the articleId query parameter. --- components/wepPublication/WepPublication.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/wepPublication/WepPublication.vue b/components/wepPublication/WepPublication.vue index 87c5c38..c512c60 100644 --- a/components/wepPublication/WepPublication.vue +++ b/components/wepPublication/WepPublication.vue @@ -409,7 +409,9 @@ export default Vue.extend({ this.publication.blocks?.revealRemovedBlocks() this.showPaywall = false // remove articleId param in case logged-in user want's to share the article with non-logged-in users - this.$router.replace(this.$route.path) + const currentQuery = { ...this.$route.query }; + delete currentQuery.articleId; + this.$router.replace({ path: this.$route.path, query: currentQuery }); }, addPaywallBlock (paywalls: Paywalls): void { if (!this.paywallRulesGiven()) {