Search code examples
google-chrome-devtoolses6-promise

Uncaught (in promise) undefined in google chrome


In google chrome I get this error, but I can't understand what causes ituncaught error

The PhotoFloate.getJsonFile() function correctly returns a promise.

The promise has its .catch() code.

Why is that error thrown in line 395?


Solution

  • The reason was that promise.then() wants two arguments, the resolve() function and the reject() one.

    I only had the resolve() one.