From ad60d49611f57f8f6e7ae4608eae7085878a38ab Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Fri, 6 Feb 2015 23:35:19 +1100 Subject: [PATCH] fix bindingEquals in constants transformer --- lib/6to5/transformation/transformers/es6/constants.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/6to5/transformation/transformers/es6/constants.js b/lib/6to5/transformation/transformers/es6/constants.js index 0d11b5fb1b..db281767dd 100644 --- a/lib/6to5/transformation/transformers/es6/constants.js +++ b/lib/6to5/transformation/transformers/es6/constants.js @@ -25,7 +25,7 @@ var visitor = { if (id === constant) continue; // check if there's been a local binding that shadows this constant - if (scope.bindingEquals(key, constant)) continue; + if (!scope.bindingEquals(key, constant)) continue; throw state.file.errorWithNode(id, key + " is read-only"); }