【发布时间】:2022-11-15 14:41:15
【问题描述】:
我有如下功能
const redirect = async () => {
await aFunc().then(async () => {
await bFunc().then((externalUrl) = {
window.location.href = externalUrl;
});
});
}
await redirect();
当我调试这段代码时,我注意到当它执行“window.location.href”行时,它不会重定向到外部 url,而是重新加载它自己的页面
【问题讨论】:
标签: javascript