Applet iOS Promise does not support finally syntax TypeError: undefined is not a function .finally is not a function

Applet iOS Promise does not support finally syntax

At the beginning, I knew that the finally syntax was in Java. I thought it was a very basic syntax, so it should also be supported in JavaScript, and there was no need to consider compatibility. Later, I checked MDN and found that it was not.

Promise's finally and try...catch...finally are not the same thing, they are just called finally.

In the iOS of the applet, the finaly syntax of Promise is not directly supported, and an TypeError: undefined is not a functionor .finally is not a functionerror will be reported. Fortunately, replacing finaly with then can solve the problem
insert image description here

Guess you like

Origin blog.csdn.net/ZhaoBuDaoFangXia/article/details/106380536