@symbo.ls/router 2.12.71 → 2.12.83

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 +4 -3
  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 { merge } from '@domql/utils'
6
+ import { merge } from 'smbls'
7
7
 
8
8
  export const getLocationPath = (index = 0, route = window.location.pathname) => {
9
9
  const routeArray = route.split('/')
@@ -76,7 +76,7 @@ export const router = (
76
76
  const pathChanged = pathname !== lastPathname
77
77
  lastPathname = pathname
78
78
 
79
- if (!content) return
79
+ if (!content || (element.state.root.debugging && !options.allowRouterWhileInspect)) return
80
80
  if (options.pushState) {
81
81
  options.window.history.pushState({
82
82
  prevUrl: options.window.location.href, ...state
@@ -90,7 +90,7 @@ export const router = (
90
90
  // || (!rootRouteHasChanged && { preventUpdateTriggerStateUpdate: true, preventContentUpdate: true })
91
91
 
92
92
  if (options.updateState) {
93
- element.state.update({ route, hash, routeInContent }, {
93
+ element.state.update({ route, hash, routeInContent, debugging: false }, {
94
94
  preventUpdate: options.preventUpdate,
95
95
  ...options.updateStateOptions
96
96
  })
@@ -110,6 +110,7 @@ export const router = (
110
110
  ...options.setOptions
111
111
  })
112
112
  }
113
+ element.content.__ref.__componentKey = route
113
114
  }
114
115
 
115
116
  if (!isModal && element.Modal?.content) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@symbo.ls/router",
3
- "version": "2.12.71",
3
+ "version": "2.12.83",
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": "6b414c297069ac025a018e907f1f1d55331bcbf7",
14
+ "gitHead": "5d4d256338d3861d1a7bb7c363a2261d3794e2a9",
15
15
  "source": "index.js"
16
16
  }