这是我的arrow函数,我把它存储在let s
arrow函数中,我把它存储在一个循环中,并合并了object.assign
中的所有对象。但是,当我运行let s
arrow函数时,我得到了一个Promise { undefined }错误。
let s = async() => {
Object.values(sqlQuery).map(async(o:any) => {
a.map(async(k:any) => {
c.map(async(l:any) => {
var district:any = `select slug from foa_section_content where foa_section_content_id IN (${k})`;
var [district1]: any = await connection.execute(district);
var commune:any = `select slug from foa_section_content where foa_section_content_id IN (${l})`;
var [commune1]: any = await connection.execute(commune);
s = await (Object.assign(o,{district1},{commune1}))
})
})
})
}
return (s());
1条答案
按热度按时间xesrikrc1#
问题是您没有从箭头函数返回值。箭头函数的语法为: