@symbo.ls/router 2.12.68 → 2.12.73

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 -4
  2. package/package.json +2 -2
package/index.js CHANGED
@@ -76,21 +76,21 @@ 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
83
83
  }, null, route + (hash ? `#${hash}` : ''))
84
84
  }
85
85
 
86
- const isModal = isModalRoute(pathname, element)
86
+ const isModal = !!isModalRoute(pathname, element)
87
87
 
88
88
  if (pathChanged || !hashChanged) {
89
89
  // const rootRouteHasChanged = rootRoute !== element.state.rootRoute
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
  })
@@ -98,7 +98,7 @@ export const router = (
98
98
 
99
99
  const hasSet = isInitial || (!isInitial && !isModal)
100
100
  if (hasSet) {
101
- if (options.forceContentUpdate || (!isInitial && wasModal && isModal)) {
101
+ if (options.forceContentUpdate || (!isInitial && wasModal)) {
102
102
  element.content.update()
103
103
  } else {
104
104
  element.set({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@symbo.ls/router",
3
- "version": "2.12.68",
3
+ "version": "2.12.73",
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": "a9fc9f11d74aeb7c95403c9fe726e410ca9cb762",
14
+ "gitHead": "5236b1a8147a31c32a0187e42c4c1f82a266e389",
15
15
  "source": "index.js"
16
16
  }