humanmade / humanmade/asset-manager-framework
Click handler doesn't properly check if `library` property exists.
Open
- Dominant language
- PHP
- Stars
- 188
- Forks
- 6
- Avg merge
- 6d 21h
- Merged PRs (30d)
- 1
Description
In the `get_click_hanlder` function within the `functions.js` file ([line 27, specifically](https://github.com/humanmade/asset-manager-framework/blob/master/src/functions.js#L27)), the `item.requires.library` statement doesn't properly check if both `requires` and `library` exist. This can cause issues with custom button implementations that do not have these attributes.
Correct implementation could / should be `item?.requires?.library`.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.