@domql/router 2.5.70 → 2.5.82

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/dist/cjs/index.js CHANGED
@@ -60,14 +60,14 @@ const router = (path, element, state = {}, passedOptions = {}) => {
60
60
  const hashChanged = hash && hash !== import_utils.window.location.hash.slice(1);
61
61
  const pathChanged = pathname !== lastPathname;
62
62
  lastPathname = pathname;
63
- if (!content)
63
+ if (!content || element.state.root.debugging)
64
64
  return;
65
65
  if (options.pushState) {
66
66
  import_utils.window.history.pushState(state, null, pathname + (hash ? `#${hash}` : ""));
67
67
  }
68
68
  if (pathChanged || !hashChanged) {
69
69
  if (options.updateState) {
70
- element.state.update({ route, hash }, { preventContentUpdate: true });
70
+ element.state.update({ route, hash, debugging: false }, { preventContentUpdate: true });
71
71
  }
72
72
  if (contentElementKey && options.removeOldElement) {
73
73
  element[contentElementKey].remove();
package/index.js CHANGED
@@ -46,14 +46,14 @@ export const router = (
46
46
  const pathChanged = pathname !== lastPathname
47
47
  lastPathname = pathname
48
48
 
49
- if (!content) return
49
+ if (!content || element.state.root.debugging) return
50
50
  if (options.pushState) {
51
51
  window.history.pushState(state, null, pathname + (hash ? `#${hash}` : ''))
52
52
  }
53
53
 
54
54
  if (pathChanged || !hashChanged) {
55
55
  if (options.updateState) {
56
- element.state.update({ route, hash }, { preventContentUpdate: true })
56
+ element.state.update({ route, hash, debugging: false }, { preventContentUpdate: true })
57
57
  }
58
58
 
59
59
  if (contentElementKey && options.removeOldElement) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@domql/router",
3
- "version": "2.5.70",
3
+ "version": "2.5.82",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "dist/esm/index.js",
@@ -15,7 +15,7 @@
15
15
  ],
16
16
  "scripts": {
17
17
  "copy:package:cjs": "cp ../../build/package-cjs.json dist/cjs/package.json",
18
- "build:esm": "npx esbuild *.js --target=es2019 --format=esm --outdir=dist/esm",
18
+ "build:esm": "npx esbuild *.js --target=es2017 --format=esm --outdir=dist/esm",
19
19
  "build:cjs": "npx esbuild *.js --target=node16 --format=cjs --outdir=dist/cjs",
20
20
  "build:iife": "npx esbuild *.js --target=node16 --format=iife --outdir=dist/iife",
21
21
  "build": "yarn build:cjs",
@@ -25,7 +25,7 @@
25
25
  "@domql/globals": "latest",
26
26
  "@domql/utils": "latest"
27
27
  },
28
- "gitHead": "2b5a18c63d6037ad465f1dc7031b8f7e5f73938a",
28
+ "gitHead": "d459c82294b8af698a706e4310cce67878e0969f",
29
29
  "devDependencies": {
30
30
  "@babel/core": "^7.12.0"
31
31
  }