Skip to content

Commit

Permalink
Merge f8514f4 into 144718c
Browse files Browse the repository at this point in the history
  • Loading branch information
jussi-kalliokoski committed Oct 30, 2014
2 parents 144718c + f8514f4 commit 0c0ad93
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 15 deletions.
8 changes: 4 additions & 4 deletions compile.js
Expand Up @@ -23,11 +23,11 @@ function compile (item) {
var props = item[1];
var children;

if (props != null && props.constructor === Object) {
children = item.slice(2)
if ( props != null && props.constructor === Object ) {
children = item.slice(2);
} else {
props = {}
children = item.slice(1)
props = {};
children = item.slice(1);
}

children = compileChildren(children);
Expand Down
10 changes: 2 additions & 8 deletions gulpfile.js
Expand Up @@ -16,22 +16,16 @@ var configFiles = [
"./test/**/*.js",
];

function handleError (error) {
throw error;
}

gulp.task("jscs", function () {
return gulp.src(files.concat(configFiles))
.pipe(jscs("./.jscs.json"))
.on("error", handleError);
.pipe(jscs("./.jscs.json"));
});

gulp.task("jshint", function () {
return gulp.src(files.concat(configFiles))
.pipe(jshint())
.pipe(jshint.reporter("default"))
.pipe(jshint.reporter("fail"))
.on("error", handleError);
.pipe(jshint.reporter("fail"));
});

gulp.task("mocha", function (callback) {
Expand Down
4 changes: 2 additions & 2 deletions test/MainSpec.js
Expand Up @@ -4,7 +4,7 @@ describe("no-jsx", function () {
var noJsx = require("../index");

it("should export library functions", function () {
noJsx.should.have.property('compile');
noJsx.should.have.property('mixin');
noJsx.should.have.property("compile");
noJsx.should.have.property("mixin");
});
});
2 changes: 1 addition & 1 deletion test/NoJsxSpec.js
Expand Up @@ -43,7 +43,7 @@ var TestBasicComponent = React.createClass({
["p", "Bar"],
];
},
})
});

describe("no-jsx mixin", function () {
it("should convert the items returned by renderTree() to React elements", function () {
Expand Down

0 comments on commit 0c0ad93

Please sign in to comment.