From 7e8b4888d2153e1cfe04034aad7457c1d999d418 Mon Sep 17 00:00:00 2001 From: "guillem.cordoba" Date: Wed, 12 Jun 2024 17:37:30 +0200 Subject: [PATCH] Documentation pop --- packages/elements/src/router.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/elements/src/router.ts b/packages/elements/src/router.ts index 7c4adb8..c17f64f 100644 --- a/packages/elements/src/router.ts +++ b/packages/elements/src/router.ts @@ -25,8 +25,10 @@ export class Routes extends NativeRoutes { return pathname.split(prefix)[1]; } - // Goes back, and if there is no page saved in the history of the app, - // goes back up to the root of the previous level of the pathname + /// Goes back, and if there is no page saved in the history of the app, + /// goes back up to the root of the previous level of the pathname + /// + /// Having no page saved in the history of the app usually means that the user refreshed the page pop(parentPath: string = '') { const previousPathname = this.currentPathname(); window.history.back();