From b91b4a4dc03eff8647b669c8935b18f0c6d7ed81 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Wed, 29 Jul 2015 16:43:52 +0100 Subject: [PATCH] fix syntax error --- packages/babylon/src/plugins/jsx/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/babylon/src/plugins/jsx/index.js b/packages/babylon/src/plugins/jsx/index.js index f05266d1de..f573fff9e9 100644 --- a/packages/babylon/src/plugins/jsx/index.js +++ b/packages/babylon/src/plugins/jsx/index.js @@ -228,9 +228,10 @@ pp.jsxParseElementName = function() { // Parses any type of JSX attribute value. pp.jsxParseAttributeValue = function() { + var node; switch (this.state.type) { case tt.braceL: - let node = this.jsxParseExpressionContainer(); + node = this.jsxParseExpressionContainer(); if (node.expression.type === "JSXEmptyExpression") { this.raise(node.start, "JSX attributes must only be assigned a non-empty expression"); } else { @@ -239,7 +240,7 @@ pp.jsxParseAttributeValue = function() { case tt.jsxTagStart: case tt.string: - let node = this.parseExprAtom(); + node = this.parseExprAtom(); node.rawValue = null; return node;