Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
Back to tool/Back to issues
#1041·casl

Casl/Vue + Storybook unable to access $can global

Author: hinogiCreated Apr 28, 2025Updated Apr 28, 2025
Labelsbug

Describe the bug Property "$can" was accessed during render but is not defined on instance.

To Reproduce In a storybook preview.ts I used

typescript
setup((app) => {
...
  app.use(abilitiesPlugin, ability, {
    useGlobalProperties: true
  })
...
})

Expected behavior global registration of casl/vue should work in storybook

Source: stalniy/casl

View original on GitHubView discussion on GitHub