From 92475fdbf4fa5bf7c4cf1564823f7bf75c1d39f6 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Wed, 21 Dec 2022 13:38:39 +0000 Subject: [PATCH] fix: allow sharing invite links within elk --- middleware/link.global.ts | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 middleware/link.global.ts diff --git a/middleware/link.global.ts b/middleware/link.global.ts new file mode 100644 index 00000000..6d78da12 --- /dev/null +++ b/middleware/link.global.ts @@ -0,0 +1,6 @@ +const reloadRoutes = new Set(['/invite']) + +export default defineNuxtRouteMiddleware((to) => { + if (process.client && reloadRoutes.has(to.fullPath)) + window.location.pathname = to.path +})