AbilityBuilder
fails when the ability factory is an arrow function
#981
Labels
AbilityBuilder
fails when the ability factory is an arrow function
#981
Describe the bug
AbilityBuilder
fails when the ability factory is an arrow function with the errorThis is because arrow functions don't have a
.prototype
property, and soisAbilityClass
fails.To Reproduce
Steps to reproduce the behavior:
Expected behavior
AbilityBuilder
should work with arrow functions as the factory.Interactive example (optional, but highly desirable)
N/A
CASL Version
@casl/ability
- v6.7.1@casl/mongoose
- v8.0.2Environment:
NodeJS v20.13.1
The text was updated successfully, but these errors were encountered: