阅读背景:

如何处理并不总是返回承诺的函数?

来源:互联网 

What is the best way to handle situations when a function does not always return a promise? My actual code is too complicated to explain but the essence of the problem boils down to checking a condition and depending on it I either return a local variable or need to send an ajax request. Something like this:What is the best way to handle situations when




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: