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
The ordering problem could be solved by disallowing Regex in these maps, i.e. "image/*" is disallowed, then rather than looping through the map, it would be accessed directly by key (i.e. readAsMap[type] || readAsDefault).
Alternatively, you could do something to this effect, where you will match the exact content type before trying to match with a regex:
This doesn't really fix the issue, though, it just makes it a little less common (it will still, for example, pop up for { "image/" : "DataUrl", "image/jp", "BinaryString" }).
The interface with the readAsMap is a bit awkward -- typically I'd assume that this:
would make all inputs return a DataURL, or this:
would make all inputs return the "readAsDefault". Instead, both of these situations end up with a "readAsMap" containing
The text was updated successfully, but these errors were encountered: