await populartimes(markers[i].placeID) .then(out => {temp = 'Currently ' + out.now.currently + ' full.'}) .catch(out => {temp = 'Live data is not currently available. Historically, ' + markers[i].name + ' would be ' + out.now.usually + ' full.'}) .catch(out => {temp = 'There is currently no data available.'});
我正在尝试使我的第一个 .catch 语句再次使用第一个返回的数据,除了这次检查另一个变量(now.通常而不是 now.currently 在 .then 语句中检查)。我该怎么做呢?我已经写了这个,但我很确定传递给第一个 .catch 的输出只是来自 .then 的错误语句。
蒂亚!
UYOU
相关分类