3 ms·
I don't see the problem... function doSomething() { return new Promise((resolve,reject)={ setTimeout(reject,100); }) .catch(() =>
by tracker1 11y ago
I don't see the problem...
function doSomething() {
return new Promise((resolve,reject)={
setTimeout(reject,100);
})
.catch(() => [])
}
doSomething().then((arg) => console.log(arg));
- seniorsassycat 11y agoThe problem may have just been the docs. They say .catch and .then can be composed but I didn't see any mention of the behavior.