Skip to content

Conversation

@Dr-Greg
Copy link
Contributor

@Dr-Greg Dr-Greg commented Jan 4, 2024

Fix: #55

The existence check with ! alone is insufficient to ensure that astMap is not undefined. The model.get() function can still return undefined, necessitating an explicit check for its presence.

@casbin-bot
Copy link

@nodece @Shivansh-yadav13 please review

@CLAassistant
Copy link

CLAassistant commented Jan 4, 2024

CLA assistant check
All committers have signed the CLA.

@hsluoyz hsluoyz changed the title fix: astMap undefined feat: fix astMap undefined issue Jan 5, 2024
@hsluoyz hsluoyz merged commit bfeab65 into node-casbin:master Jan 5, 2024
github-actions bot pushed a commit that referenced this pull request Jan 5, 2024
# [1.5.0](v1.4.0...v1.5.0) (2024-01-05)

### Features

* fix astMap undefined issue ([#54](#54)) ([bfeab65](bfeab65))
@github-actions
Copy link

github-actions bot commented Jan 5, 2024

🎉 This PR is included in version 1.5.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] astMap is undefined if there is no [role_definition] in casbin model

4 participants