From ceb32816d77c6aad38a7ee2a2d724f4f09ba1b31 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Mon, 29 Dec 2014 01:26:51 +1100 Subject: [PATCH] fix destructuring in switch/case statements - closes #346 --- lib/6to5/transformation/transformers/es6-destructuring.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/6to5/transformation/transformers/es6-destructuring.js b/lib/6to5/transformation/transformers/es6-destructuring.js index 43625f46b9..2632fb246f 100644 --- a/lib/6to5/transformation/transformers/es6-destructuring.js +++ b/lib/6to5/transformation/transformers/es6-destructuring.js @@ -268,6 +268,7 @@ exports.VariableDeclaration = function (node, parent, file, scope) { } if (!t.isProgram(parent) && !t.isBlockStatement(parent)) { + declar = null; for (i in nodes) { node = nodes[i];