Bug with file type options.accept causing desk tool to crash in Sanity v3
Last updated: May 31, 2023
[Sanity v3 bug?] File type options.accept: when I click the “Browse” button, the desk tool crashed with error: “*Error: accept.split is not a function*”. The error goes away when I remove the options.accept. Schema:
My previous Sanity v2 projects are fine.
Does anyone know how to get it resolved? Thanks.
May 25, 2023, 9:17 PM
I think ‘accept’ expects a string not an array of strings
May 25, 2023, 9:20 PM
Thank you. Weird that I had it wrong in my previous projects.
May 25, 2023, 9:24 PM
I could be wrong, but I believe both were handled in v2 (a string or an array of strings), but in v3 we tightened it up to align with what was documented (i.e., only a string). So I don’t think it’s that you were wrong before, but perhaps that we didn’t enforce it.