Skip to content

Commit

Permalink
fix NRE
Browse files Browse the repository at this point in the history
  • Loading branch information
mythz committed Nov 13, 2023
1 parent ef36af1 commit 1a467f2
Show file tree
Hide file tree
Showing 4 changed files with 3,704 additions and 3,699 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
"build": "run-p type-check build-only build-style && run-p build-minify",
"build-minify": "uglifyjs dist/servicestack-vue.mjs --compress --mangle -o dist/servicestack-vue.min.mjs",
"build-style": "postcss src/tailwind.css -o dist/styles.css",
"build-copy": "npm run build && npm run copy-src",
"build-copy": "npm run build && npm run copy-src&& npm run copy-diffusion",
"copy-src": "shx cp dist/servicestack-vue.min.mjs ../ServiceStack/ServiceStack/src/ServiceStack/js/servicestack-vue.mjs && shx cp dist/servicestack-vue.mjs ../ServiceStack/ServiceStack/tests/NorthwindAuto/wwwroot/lib/mjs/",
"copy-diffusion": "shx cp dist/servicestack-vue.m* ../../netcore/VueDiffusion/MyApp/wwwroot/lib/mjs/ && shx cp dist/index.d.ts ../../netcore/VueDiffusion/MyApp/wwwroot/lib/typings/@servicestack/vue/",
"copy-diffusion": "shx cp dist/servicestack-vue.m* ../../netcore/BlazorDiffusionVue/BlazorDiffusion/wwwroot/lib/mjs/ && shx cp dist/index.d.ts ../../netcore/BlazorDiffusionVue/BlazorDiffusion/wwwroot/lib/typings/@servicestack/vue/",
"copy-creatorkit": "shx cp dist/servicestack-vue.m* ../../netcore/CreatorKit/CreatorKit/wwwroot/lib/mjs/ && shx cp dist/index.d.ts ../../netcore/CreatorKit/CreatorKit/wwwroot/lib/typings/@servicestack/vue/",
"preview": "vite preview",
"build-only": "vite build -l error",
Expand All @@ -28,7 +28,7 @@
"postversion": "git push && git push --tags"
},
"dependencies": {
"@servicestack/client": "^2.0.15",
"@servicestack/client": "^2.0.17",
"vue": "^3.2.47",
"vue-router": "^4.1.6"
},
Expand Down
4 changes: 2 additions & 2 deletions src/use/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ function signOut() {
}

/** @returns {string[]} */
const getRoles = (user:any) => user.roles || []
const getRoles = (user:any) => user?.roles || []
/** @returns {string[]} */
const getPermissions = (user:any) => user.permissions || []
const getPermissions = (user:any) => user?.permissions || []

/** Check if the Authenticated User has a specific role */
function hasRole(role:string) {
Expand Down
Loading

0 comments on commit 1a467f2

Please sign in to comment.