socket-controllers
socket-controllers copied to clipboard
fix: Cannot read property 'filter' of undefined
Fixes
Description
if controllers array is empty or undefined i have error "Cannot read property 'filter' of undefined"
Checklist
- [x] the pull request title describes what this PR does (not a vague title like
Update index.md) - [x] the pull request targets the default branch of the repository (
develop) - [x] the code follows the established code style of the repository
npm run prettier:checkpassesnpm run lint:checkpasses
- [x] tests are added for the changes I made (if any source code was modified)
- [ ] documentation added or updated
- [ ] I have run the project locally and verified that there are no errors
Fixes
fixes #216
Hi!
Thanks for the PR, please add a test case for this as well, so we know it won' be re-introduced later.
Hi! Glad to be of service. Tests have been added.
Hey everyone, was this ever fixed? I'm getting the same error still when calling useSocketServer without the controllers array.
@alexgev Sorry for the late action on this. I've included your fix and test in another PR. Thanks again!
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.