Skip to content

Bug: Last JSX tag returned, when compiler should throw error #5034

Closed
@remoteportal

Description

@remoteportal

Because of the parenthesis BOTH tags should be included in the return statement. In error only the last one is:

CoffeeScript:

		JSXFunction = -> (
				<Row>ABC</Row>
				<Row>DEF</Row>
			)

Errant JavaScript:

// Generated by CoffeeScript 2.2.4
  JSXFunction = function() {
        <Row>ABC</Row>;
        return <Row>DEF</Row>;
      };

Correct JavaScript:

  JSXFunction = function() {
        return <Row>ABC</Row>
            <Row>DEF</Row>;
      };

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions