Skip to content

Commit a8ce90c

Browse files
committed
Add edge case handling for undefined styles
1 parent 7f146fa commit a8ce90c

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

.travis.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,4 @@ node_js:
1313
- "0.8"
1414
script:
1515
- npm install
16-
- npm install if-node-version
17-
- if-node-version ">=4" "./node_modules/.bin/eslint . "
1816
- npm test

lib/colors.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ function applyStyle() {
105105
var args = Array.prototype.slice.call(arguments);
106106

107107
var str = args.map(function(arg) {
108-
if (arg.constructor === String) {
108+
if (arg !== undefined && arg.constructor === String) {
109109
return arg;
110110
} else {
111111
return util.inspect(arg);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "colors",
33
"description": "get colors in your node.js console",
4-
"version": "1.2.4",
4+
"version": "1.2.5",
55
"author": "Marak Squires",
66
"homepage": "https://github.com/Marak/colors.js",
77
"bugs": "https://github.com/Marak/colors.js/issues",

0 commit comments

Comments
 (0)