@symbo.ls/router 2.12.133 → 2.12.136

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
@@ -52,7 +52,7 @@ const defaultOptions = {
52
52
  }
53
53
 
54
54
  // eslint-disable-next-line default-param-last
55
- export function router (path = '/', el, state = {}, passedOptions = {}) {
55
+ export async function router (path = '/', el, state = {}, passedOptions = {}) {
56
56
  const element = el || (this && this.getRoot())
57
57
  const options = merge(passedOptions, defaultOptions)
58
58
  lastLevel = options.level
@@ -109,7 +109,7 @@ export function router (path = '/', el, state = {}, passedOptions = {}) {
109
109
  // || (!rootRouteHasChanged && { preventUpdateTriggerStateUpdate: true, preventContentUpdate: true })
110
110
 
111
111
  if (options.updateState) {
112
- element.state.update(
112
+ await element.state.update(
113
113
  { route, hash, routeInContent, debugging: false },
114
114
  {
115
115
  preventUpdate: options.preventUpdate,
@@ -123,14 +123,14 @@ export function router (path = '/', el, state = {}, passedOptions = {}) {
123
123
  const hasSet = isInitial || (!isInitial && !isModal)
124
124
  if (hasSet) {
125
125
  if (options.forceContentUpdate || (!isInitial && wasModal)) {
126
- element.content.update(
126
+ await element.content.update(
127
127
  {},
128
128
  {
129
129
  preventUpdate: options.preventUpdate
130
130
  }
131
131
  )
132
132
  } else {
133
- element.set(
133
+ await element.set(
134
134
  {
135
135
  tag: options.useFragment && 'fragment',
136
136
  extend: content
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@symbo.ls/router",
3
- "version": "2.12.133",
3
+ "version": "2.12.136",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -10,6 +10,6 @@
10
10
  "dependencies": {
11
11
  "@domql/utils": "^2.5.0"
12
12
  },
13
- "gitHead": "fc0b191569e8b22072ea38ba308bef730d207e37",
13
+ "gitHead": "fd64a76f2931f172d6618dbfb71fd9602bad628c",
14
14
  "source": "index.js"
15
15
  }