You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This error is thrown when you don't have the ability. But when you do, it works like expected.
TypeError: Object prototype may only be an Object or null: undefined
at Function.create (<anonymous>)
at /Users/data-api/node_modules/@casl/mongoose/dist/umd/index.js:1:852
at Function.u [as accessibleBy] (/Users/data-api/node_modules/@casl/mongoose/dist/umd/index.js:1:969)
at /Users/data-api/dist/api/person/person.js:33:18
at Generator.next (<anonymous>)
at /Users/data-api/dist/api/person/person.js:8:71
The text was updated successfully, but these errors were encountered:
Thanks for the time to contribute this issue! The issue is fixed now and I'm currently working on another issue with types. When that is finished, I will release a patch version.
I am trying to use the accessibleBy function from @casl/mongoose like this:
My ability is defined from this JSON array:
This error is thrown when you don't have the ability. But when you do, it works like expected.
The text was updated successfully, but these errors were encountered: