Closed okcompewter closed 2 years ago
Any update on this issue? Still seeing a lot of non-fatal errors and crashes with it. Thank you!
Hi @okcompewter! Thanks for creating a separate issue! š The stack trace was quite revealing. By the looks of it, the issue comes from ModalProvider.tsx:39
:
Which would mean that openModal()
is being invoked before the stack could be initialized:
I'll add a fix in v3.3.0
today that would give a default value to the internal state which was undefined
up until now:
I think that should fix the crashes you're getting but at the same time: you might want to investigate where openModal()
is being called so early.
I figured that was likely the issue (stack not yet initialized when it is called). It is a bit of a mystery to me how this could even be happening though...
I will update with this fix today! Thanks so much š
Breaking out of Issue 73, I've updated to 3.2.0, and it seems to have fixed a lot of errors, but I'm still seeing this one crash log in production occasionally:
Are you sure the recent optional chaining fix doesn't need done elsewhere as well?
When looking at your fix, before the slice check:
currentModalHash: [...currentState.stack.openedItems].slice(-1)[0]?.hash,
may it be possible that any of these are also undefined:
currentState
orcurrentState.stack
orcurrentState.stack.openedItems
?The crash: