Skip to content

Commit

Permalink
facebook#114 - stop requiring docblock for JSX transformer
Browse files Browse the repository at this point in the history
  • Loading branch information
SanderSpies committed Oct 10, 2013
1 parent 4549fd7 commit 8cfb1aa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions vendor/browser-transforms.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ if (typeof window === "undefined" || window === null) {
headEl = document.getElementsByTagName('head')[0];

var run = exports.run = function(code) {
var jsx = docblock.parseAsObject(docblock.extract(code)).jsx;

var functionBody = jsx ? transform(code).code : code;
var functionBody = transform(code).code;
var scriptEl = document.createElement('script');

scriptEl.innerHTML = functionBody;
Expand Down
2 changes: 1 addition & 1 deletion vendor/fbtransform/transforms/react.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ var JSX_ATTRIBUTE_TRANSFORMS = {
};

function visitReactTag(traverse, object, path, state) {
var jsxObjIdent = getDocblock(state).jsx;
var jsxObjIdent = getDocblock(state).jsx || "React.DOM";

catchup(object.openingElement.range[0], state);

Expand Down

0 comments on commit 8cfb1aa

Please sign in to comment.