@symbo.ls/router 2.12.64 → 2.12.65

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.
Files changed (2) hide show
  1. package/index.js +8 -8
  2. package/package.json +2 -2
package/index.js CHANGED
@@ -3,7 +3,7 @@
3
3
  import { setCookie } from '@domql/cookie'
4
4
  import { redirectBasedOnAuth } from '@symbo.ls/auth-redirect'
5
5
  import { isModalRoute } from '@symbo.ls/platform-utils'
6
- import { deepMerge } from '@domql/utils'
6
+ import { merge } from '@domql/utils'
7
7
 
8
8
  export const getLocationPath = (index = 0, route = window.location.pathname) => {
9
9
  const routeArray = route.split('/')
@@ -47,7 +47,7 @@ export const router = (
47
47
  state = {},
48
48
  passedOptions = {}
49
49
  ) => {
50
- const options = deepMerge(passedOptions, defaultOptions)
50
+ const options = merge(passedOptions, defaultOptions)
51
51
  lastLevel = options.level
52
52
 
53
53
  const [pathname, hash] = path.split('#')
@@ -96,12 +96,6 @@ export const router = (
96
96
  })
97
97
  }
98
98
 
99
- if (!isModal && element.Modal) {
100
- element.Modal.removeContent()
101
- } else if (isModal && element.content?.Tabs) {
102
- element.content.Tabs.update()
103
- }
104
-
105
99
  if (hasSet) {
106
100
  if (options.forceContentUpdate || (!isInitial && wasModal)) {
107
101
  element.content.update()
@@ -116,6 +110,12 @@ export const router = (
116
110
  })
117
111
  }
118
112
  }
113
+
114
+ if (!isModal && element.Modal.content) {
115
+ element.Modal.removeContent()
116
+ } else if (isModal && element.content?.Tabs) {
117
+ element.content.Tabs.update()
118
+ }
119
119
  }
120
120
 
121
121
  const rootNode = element.node
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@symbo.ls/router",
3
- "version": "2.12.64",
3
+ "version": "2.12.65",
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": "301d177fb42ff3de5ff2c3b6c3bd8711ba7c42f2",
14
+ "gitHead": "6590c42ef1d9670bc29e76efc22962abf4c49196",
15
15
  "source": "index.js"
16
16
  }