Uncaught (in promise) solution

"Uncaught (in promise)" is a JavaScript error that usually occurs when a Promise is fulfilled. There are several possible solutions:

  1. Handle errors in a catch block. For example:
somePromise()
  .then(function(result) {
    // 处理结果
  })
  .catch(function(error) {
    // 处理错误
  });

Guess you like

Origin blog.csdn.net/weixin_42596246/article/details/129553132