@symbo.ls/router 2.12.62 → 2.12.64
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +3 -3
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -5,9 +5,9 @@ import { redirectBasedOnAuth } from '@symbo.ls/auth-redirect'
|
|
|
5
5
|
import { isModalRoute } from '@symbo.ls/platform-utils'
|
|
6
6
|
import { deepMerge } from '@domql/utils'
|
|
7
7
|
|
|
8
|
-
export const
|
|
8
|
+
export const getLocationPath = (index = 0, route = window.location.pathname) => {
|
|
9
9
|
const routeArray = route.split('/')
|
|
10
|
-
const activeRoute = routeArray[
|
|
10
|
+
const activeRoute = routeArray[index + 1]
|
|
11
11
|
if (activeRoute) return `/${activeRoute}`
|
|
12
12
|
}
|
|
13
13
|
|
|
@@ -51,7 +51,7 @@ export const router = (
|
|
|
51
51
|
lastLevel = options.level
|
|
52
52
|
|
|
53
53
|
const [pathname, hash] = path.split('#')
|
|
54
|
-
const rootRoute =
|
|
54
|
+
const rootRoute = getLocationPath(0, path)
|
|
55
55
|
let routeArray = pathname.split('/')
|
|
56
56
|
|
|
57
57
|
if (options.authCheck) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbo.ls/router",
|
|
3
|
-
"version": "2.12.
|
|
3
|
+
"version": "2.12.64",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"scripts": {
|
|
@@ -11,6 +11,6 @@
|
|
|
11
11
|
"@domql/utils": "latest",
|
|
12
12
|
"@symbo.ls/auth-redirect": "latest"
|
|
13
13
|
},
|
|
14
|
-
"gitHead": "
|
|
14
|
+
"gitHead": "301d177fb42ff3de5ff2c3b6c3bd8711ba7c42f2",
|
|
15
15
|
"source": "index.js"
|
|
16
16
|
}
|