You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Probably I had to report this issue to solid-router, but actually all the methods of useSubmission are undefined by default, even when server returns flash= cookie with action result info, i.e. no javascript case is not working and it is probably solid-start issue.
Oh.. I see. Yeah this is a router issue. Like the API for useSubmissions assumes an array and it can be empty. However for useSubmission it assume one and it can be undefined. I did it with a proxy so it could dynamically switch under without a accessor function but I'm being too clever here. I should probably have the proxy always return the method even as a no-op. But in general this is an example where I probably didn't take TS into consideration properly because as you said any property could be undefined. I will need to look at what I can do here with TS.
Duplicates
Latest version
Current behavior 😯
submission.clear() throws TypeError: submission.clear is not a function
Expected behavior 🤔
submission.clear() does not throw
Steps to reproduce 🕹
Steps:
Context 🔦
Typings says clear can't be undefined:
solid-router/src/types.ts
Lines 195 to 203 in 10b7d8c
Seams like need to fix typings or always return a clear function.
Your environment 🌎
The text was updated successfully, but these errors were encountered: