reqwest
reqwest copied to clipboard
fix checking for FormData existence
in Safari, typeof FormData returns "object" instead of "function"
In that case, is there a more legit way of checking like seeing if it has any unique properties?
Isn't o['data'] instanceof FormData enough on its own? Why is the typeof check neccesary?
@keronsen In older browsers, FormData is not defined, so o['data'] instanceof FormData will throw ReferenceError.
Any updates on this? According to @yeonhoyoon's last comment, perhaps the check should be:
typeof FormData !== 'undefined', or 'FormData' in window