Skip to content

Commit acfca62

Browse files
fix(router): store initial action code in reactive ref instead of non-path route param
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent 71f3245 commit acfca62

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/router/router.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { createRouter, createWebHistory, type Router, type RouteRecordRaw } from
88
import { loadState } from '@nextcloud/initial-state'
99
import { getRootUrl, generateUrl } from '@nextcloud/router'
1010

11+
import { initialActionCode } from '../helpers/ActionMapping'
1112
import { isExternal } from '../helpers/isExternal'
1213
import { selectAction } from '../helpers/SelectAction'
1314

@@ -212,7 +213,7 @@ router.beforeEach((to, from, next) => {
212213
let action
213214
if (actionElement) {
214215
const actionValue = loadState('libresign', 'action', 0)
215-
to.params.action = String(actionValue)
216+
initialActionCode.value = actionValue
216217
action = selectAction(actionValue, to, from)
217218
document.querySelector('#initial-state-libresign-action')?.remove()
218219
}

0 commit comments

Comments
 (0)