transpile failed when using for-of + destructuring
source code:
// test.js
for (var {x, y} of [{x: 1, y: 2}]) {
console.log(x, y);
};
transpile
buble test.js --yes dangerousForOf
error:
TypeError: Cannot read property 'type' of null
at /home/xc/.npm-packages/lib/node_modules/buble/dist/buble.deps.js:13651:36
at Array.forEach (native)
at VariableDeclaration.transpile (/home/xc/.npm-packages/lib/node_modules/buble/dist/buble.deps.js:13639:24)
at ForOfStatement.transpile (/home/xc/.npm-packages/lib/node_modules/buble/dist/buble.deps.js:5467:12)
at ForOfStatement.transpile (/home/xc/.npm-packages/lib/node_modules/buble/dist/buble.deps.js:6495:30)
at ForOfStatement.transpile (/home/xc/.npm-packages/lib/node_modules/buble/dist/buble.deps.js:6635:39)
at /home/xc/.npm-packages/lib/node_modules/buble/dist/buble.deps.js:5465:61
at Array.forEach (native)
at BlockStatement.transpile (/home/xc/.npm-packages/lib/node_modules/buble/dist/buble.deps.js:5465:12)
at BlockStatement.transpile (/home/xc/.npm-packages/lib/node_modules/buble/dist/buble.deps.js:14086:30)