const promise1 = new Promise((resolve, reject) => reject());
const promise2 = promise1.then(
// null,
// function () {
// return 123
// },
null,
function () {
return {
get then() {
throw new Error();
}
}
}
)
promise2.then(
() => {
console.log('已完成');
},
() => {
console.log('已拒绝');
}
)