Skip to content

Commit

Permalink
Add edge case handling for undefined styles
Browse files Browse the repository at this point in the history
  • Loading branch information
DABH committed May 11, 2018
1 parent 7f146fa commit a8ce90c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions .travis.yml
Expand Up @@ -13,6 +13,4 @@ node_js:
- "0.8"
script:
- npm install
- npm install if-node-version
- if-node-version ">=4" "./node_modules/.bin/eslint . "
- npm test
2 changes: 1 addition & 1 deletion lib/colors.js
Expand Up @@ -105,7 +105,7 @@ function applyStyle() {
var args = Array.prototype.slice.call(arguments);

var str = args.map(function(arg) {
if (arg.constructor === String) {
if (arg !== undefined && arg.constructor === String) {
return arg;
} else {
return util.inspect(arg);
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,7 +1,7 @@
{
"name": "colors",
"description": "get colors in your node.js console",
"version": "1.2.4",
"version": "1.2.5",
"author": "Marak Squires",
"homepage": "https://github.com/Marak/colors.js",
"bugs": "https://github.com/Marak/colors.js/issues",
Expand Down

0 comments on commit a8ce90c

Please sign in to comment.