@symbo.ls/router 2.32.0 → 2.32.2

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 +2 -2
  2. package/package.json +3 -3
package/index.js CHANGED
@@ -55,8 +55,7 @@ let lastElement = {}
55
55
 
56
56
  // eslint-disable-next-line default-param-last
57
57
  export async function router(path = '/', el, state = {}, passedOptions = {}) {
58
- const rootElem = this && this.getRoot()
59
- const element = el && el.routes ? el : rootElem
58
+ const element = el || (this && this.getRoot())
60
59
  const options = merge(passedOptions, defaultOptions)
61
60
  lastLevel = options.level
62
61
 
@@ -68,6 +67,7 @@ export async function router(path = '/', el, state = {}, passedOptions = {}) {
68
67
  }
69
68
  element.call('closeModal')
70
69
  if (options.event) options.event.preventDefault()
70
+ return
71
71
  }
72
72
 
73
73
  const urlObj = new options.window.URL(options.window.location.origin + path)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@symbo.ls/router",
3
- "version": "2.32.0",
3
+ "version": "2.32.2",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -8,8 +8,8 @@
8
8
  "vpatch": "npm version patch && npm publish --access public"
9
9
  },
10
10
  "dependencies": {
11
- "@domql/utils": "^2.32.0"
11
+ "@domql/utils": "^2.32.2"
12
12
  },
13
- "gitHead": "6f087b0fe036c41c8f7d620ed67c24d25e371cc6",
13
+ "gitHead": "56faf9a61c49e37a148ac6ef78fda93cf15524b2",
14
14
  "source": "index.js"
15
15
  }