1

I'm writing an aurelia application with aurelia-fetch-client library. When I try to post an object to my api service I get the error:

TypeMismatchError

In console only from Edge. Other browsers (Chrome, Firefox and IE11) have no problems. There are no description or any other details about it.

jrbedard
  • 3,662
  • 5
  • 30
  • 34
Federico Galfione
  • 1,069
  • 7
  • 19

1 Answers1

1

In all but the newest versions of Edge you need to include the fetch polyfill in order for aurelia-fetch-client to work. I think it's supported since version 14 but I wouldn't necessarily rely on it. Edge is known to be quirky with some of these things (the Promise implementation is also horribly slow, which is why I personally always use bluebird)

You can install it with npm i whatwg-fetch --save and make sure to import it + include it in your bundle config (the instructions for this depend on which build system you're using)

Fred Kleuver
  • 7,797
  • 2
  • 27
  • 38
  • Thanks for the quick reply and sorry for not being precise, but I'm already using whatwg-fetch and I have the same problem with it and without it – Federico Galfione Oct 11 '16 at 08:10