@domql/router 2.5.170 → 2.5.177

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
@@ -49,7 +49,8 @@ const defaultOptions = {
49
49
  contentElementKey: "content",
50
50
  scrollToOptions: { behavior: "smooth" }
51
51
  };
52
- const router = (path, element, state = {}, options = {}) => {
52
+ const router = (path, el, state = {}, options = {}) => {
53
+ const element = el || void 0;
53
54
  const win = element.context.window || import_utils.window;
54
55
  const doc = element.context.document || import_utils.document;
55
56
  const opts = { ...defaultOptions, ...element.context.routerOptions, ...options };
package/index.js CHANGED
@@ -29,10 +29,11 @@ const defaultOptions = {
29
29
 
30
30
  export const router = (
31
31
  path,
32
- element,
32
+ el,
33
33
  state = {},
34
34
  options = {}
35
35
  ) => {
36
+ const element = el || this
36
37
  const win = element.context.window || window
37
38
  const doc = element.context.document || document
38
39
  const opts = { ...defaultOptions, ...element.context.routerOptions, ...options }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@domql/router",
3
- "version": "2.5.170",
3
+ "version": "2.5.177",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "dist/esm/index.js",
@@ -22,9 +22,9 @@
22
22
  "prepublish": "rimraf -I dist && npm run build && npm run copy:package:cjs"
23
23
  },
24
24
  "dependencies": {
25
- "@domql/utils": "^2.5.170"
25
+ "@domql/utils": "^2.5.177"
26
26
  },
27
- "gitHead": "44f9d2c4157170a03784d6abca2eee3604b97270",
27
+ "gitHead": "faa8ed6c9ba30a49c81962cd3e16c0ffac833f4e",
28
28
  "devDependencies": {
29
29
  "@babel/core": "^7.12.0"
30
30
  }