@mapomodule/core 1.0.0-alpha.8 → 1.0.0-alpha.9

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/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [1.0.0-alpha.9](https://github.com/lotrekagency/mapo/compare/v1.0.0-alpha.8...v1.0.0-alpha.9) (2022-02-08)
7
+
8
+ **Note:** Version bump only for package @mapomodule/core
9
+
10
+
11
+
12
+
13
+
6
14
  # [1.0.0-alpha.8](https://github.com/lotrekagency/mapo/compare/v1.0.0-alpha.7...v1.0.0-alpha.8) (2022-01-23)
7
15
 
8
16
 
package/index.js CHANGED
@@ -4,7 +4,7 @@ import initInterceptors from '@mapomodule/core/interceptor'
4
4
 
5
5
  function getRouteMiddlewares(route) {
6
6
  const meta = Array.isArray(route?.meta) ? route.meta[0] : route.meta
7
- const { middleware } = meta
7
+ const { middleware } = meta || {}
8
8
  return (typeof middleware === "string" ? [middleware] : middleware) || []
9
9
  }
10
10
 
@@ -46,7 +46,7 @@ export default (ctx, inject) => {
46
46
  get token() { return ctx.store.getters['mapo/user/token'] },
47
47
  get info() { return ctx.store.getters['mapo/user/info'] },
48
48
  get username() { return ctx.store.getters['mapo/user/username'] },
49
- get permissions() { return ctx.store.getters['mapo/user/pagePermission'](ctx.app.context.route.name) },
49
+ get permissions() { return ctx.store.getters['mapo/user/pagePermission'](ctx.app?.context?.route?.name || "") },
50
50
  get role() { return ctx.store.getters['mapo/user/role'] }
51
51
  },
52
52
  /**
@@ -54,7 +54,7 @@ export default (ctx, inject) => {
54
54
  * This returns the current route middlewares if routemeta is enabled.
55
55
  */
56
56
  get routeMiddlewares() {
57
- return getRouteMiddlewares(ctx.app.context.route)
57
+ return getRouteMiddlewares(ctx.app?.context?.route || {})
58
58
  },
59
59
  /**
60
60
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mapomodule/core",
3
- "version": "1.0.0-alpha.8",
3
+ "version": "1.0.0-alpha.9",
4
4
  "description": "This is part of Mapo nuxt module. Injects the core mapo plugin helpers.",
5
5
  "author": "bnznamco <gabriele.baldi.01@gmail.com>",
6
6
  "keywords": [
@@ -13,10 +13,10 @@
13
13
  "repository": "https://github.com/lotrekagency/mapo",
14
14
  "main": "./module.js",
15
15
  "dependencies": {
16
- "@mapomodule/utils": "^1.0.0-alpha.8"
16
+ "@mapomodule/utils": "^1.0.0-alpha.9"
17
17
  },
18
18
  "publishConfig": {
19
19
  "access": "public"
20
20
  },
21
- "gitHead": "4448ce925e9f3af25f78f86c3e28a88145201520"
21
+ "gitHead": "a75142247a9371981aea57b76828bd354b375aea"
22
22
  }