Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #313 #316

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion bind.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
}
}

return classes.join(' ');
return classes.join(' ') || null;
}

if (typeof module !== 'undefined' && module.exports) {
Expand Down
2 changes: 1 addition & 1 deletion dedupe.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
}
}

return list.join(' ');
return list.join(' ') || null;
}

return _classNames;
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
}
}

return classes.join(' ');
return classes.join(' ') || null;
}

if (typeof module !== 'undefined' && module.exports) {
Expand Down
8 changes: 4 additions & 4 deletions tests/bind.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ describe('bind', function () {
assert.equal(classNames('', 'b', {}, ''), 'b');
});

it('returns an empty string for an empty configuration', function () {
assert.equal(classNames({}), '');
it('returns a null for an empty configuration', function () {
assert.equal(classNames({}), null);
});

it('supports an array of class names', function () {
Expand Down Expand Up @@ -115,8 +115,8 @@ describe('bind', function () {
assert.equal(classNamesBound('', 'b', {}, ''), '#b');
});

it('returns an empty string for an empty configuration', function () {
assert.equal(classNamesBound({}), '');
it('returns a null for an empty configuration', function () {
assert.equal(classNamesBound({}), null);
});

it('supports an array of class names', function () {
Expand Down
4 changes: 2 additions & 2 deletions tests/dedupe.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ describe('dedupe', function () {
assert.equal(dedupe('', 'b', {}, ''), 'b');
});

it('returns an empty string for an empty configuration', function () {
assert.equal(dedupe({}), '');
it('returns a null for an empty configuration', function () {
assert.equal(dedupe({}), null);
});

it('supports an array of class names', function () {
Expand Down
4 changes: 2 additions & 2 deletions tests/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ describe('classNames', function () {
assert.equal(classNames('', 'b', {}, ''), 'b');
});

it('returns an empty string for an empty configuration', function () {
assert.equal(classNames({}), '');
it('returns a null for an empty configuration', function () {
assert.equal(classNames({}), null);
});

it('supports an array of class names', function () {
Expand Down