We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f616464 commit 1b8731aCopy full SHA for 1b8731a
src/core/directives/action.js
@@ -19,7 +19,7 @@ const action = Vue.directive('action', {
19
const actionName = binding.arg
20
const roles = store.getters.roles
21
const elVal = vnode.context.$route.meta.permission
22
- const permissionId = elVal instanceof String && [elVal] || elVal
+ const permissionId = Object.prototype.toString.call(elVal) === '[object String]' && [elVal] || elVal
23
roles.permissions.forEach(p => {
24
if (!permissionId.includes(p.permissionId)) {
25
return
0 commit comments