From 671196dffaa385a70a44984eb7d5336414aaca77 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Sun, 26 Jul 2015 05:30:27 +0100 Subject: [PATCH] remove rawValue property from JSX inner text Literal nodes --- src/plugins/jsx/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/plugins/jsx/index.js b/src/plugins/jsx/index.js index 6f1163e3f9..03086cdfc9 100644 --- a/src/plugins/jsx/index.js +++ b/src/plugins/jsx/index.js @@ -379,7 +379,10 @@ export default function(instance) { instance.extend("parseExprAtom", function(inner) { return function(refShortHandDefaultPos) { if (this.match(tt.jsxText)) { - return this.parseLiteral(this.state.value); + var node = this.parseLiteral(this.state.value); + // https://github.com/babel/babel/issues/2078 + node.rawValue = null; + return node; } else if (this.match(tt.jsxTagStart)) { return this.jsxParseElement(); } else {