Page({
onLoad() {
let a = {x: 1}
let b = {x: 2}
[a, b].forEach(({x}) => {console.log(x);})
}
})
报错:
TypeError: Cannot read property 'forEach' of undefined
换成下面这样正常:
Page({
onLoad() {
let a = {x: 1}
let b = {x: 2}
// [a, b].forEach(({x}) => {console.log(x);})
let os = [a, b]
os.forEach(({x}) => {console.log(x);})
}
})
https://developers.weixin.qq.com/miniprogram/dev/devtools/nightly.html 最新已经修复