queue-anim icon indicating copy to clipboard operation
queue-anim copied to clipboard

Problem with items, that are undefined or null

Open AkitoItashi opened this issue 4 years ago • 3 comments

Hi,

I have an array with elements in my application. But they are sorted out....so it could be, that there is an item, that is null or undefined.

The problem is, that the animation breaks there and throws an error:

QueueAnim.js:410 Uncaught TypeError: Cannot read properties of null (reading 'key')
    at eval (QueueAnim.js:410)
    at Array.forEach (<anonymous>)
    at eval (QueueAnim.js:409)
    at commitHookEffectListMount (react-dom.development.js:20568)
    at commitLifeCycles (react-dom.development.js:20629)
    at commitLayoutEffects (react-dom.development.js:23421)
    at HTMLUnknownElement.callCallback (react-dom.development.js:3945)
    at Object.invokeGuardedCallbackDev (react-dom.development.js:3994)
    at invokeGuardedCallback (react-dom.development.js:4056)
    at commitRootImpl (react-dom.development.js:23146)

Would be cool, if you can fix it ^^' I like your library much :3

AkitoItashi avatar Sep 27 '21 14:09 AkitoItashi

Please provide demo, https://codesandbox.io/s/queue-anim-0pe70

jljsj33 avatar Oct 21 '21 06:10 jljsj33

Sorry, I had much work to do the last days ^^' I updated the demo, which simulates, what the problem is :3

AkitoItashi avatar Oct 25 '21 18:10 AkitoItashi

I have the same problem. This is when I navigate between pages where in QueueAnim is used in a component that is used on both pages, but in one of them the QueueAnim has an extra child (with key). When I navigate to a different page, the child doesn't exist there and the above error is thrown.

Temporary Fix: Switched back to 1.8.5

apfz avatar Jul 22 '22 10:07 apfz

I have the same problem. This is when I navigate between pages where in QueueAnim is used in a component that is used on both pages, but in one of them the QueueAnim has an extra child (with key). When I navigate to a different page, the child doesn't exist there and the above error is thrown.

Temporary Fix: Switched back to 1.8.5

changing key int to a string works for me.

AbbasHaiderNaqvi avatar Mar 02 '23 18:03 AbbasHaiderNaqvi