-
Notifications
You must be signed in to change notification settings - Fork 161
TypeError Cannot read property 'length' of null in velocity-component.js (v1.4.1) #249
Comments
I'm on the same situation, actually disable animations doesn't work for me. Any idea? |
Hrm. Looks like This can come up if the child of your |
I think my problem is related in fact I'm using this react-tree-beard with react-router , in some way this clearVelocityCache doesn't find the component when redirecting router. To solve this I just unmount this component before execute redirect in my react router. |
@nomar22 this might be a late answer, but just make sure the child of |
I see this issue has been opened for quite a long time. I'm having a similar issue with the same _clearVelocityCache(target) {
if (target.length) {
_.forEach(target, this._clearVelocityCache); If do something like the below, checking for _clearVelocityCache(target) {
if (target.length) {
_.forEach(target, this ? this._clearVelocityCache : console.log('no this here!')); I'm going to create a PR for this unless someone has a fix for this in the current version (1.4.3)? I could also include the parent |
I use this module via https://github.com/storybooks/react-treebeard and saw an error:
It seems here (line 158):
velocity-react/src/velocity-component.js
Lines 157 to 159 in b65e87f
From our sentry:
For now I'll disable animations on react-treebeard to avoid this issue; I've reported it for those who saw the same errors, anyway.
The text was updated successfully, but these errors were encountered: