Skip to content

Commit

Permalink
Undefined handling
Browse files Browse the repository at this point in the history
  • Loading branch information
garrows committed Feb 24, 2014
1 parent 90217d0 commit 40d6e25
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/license.js
Expand Up @@ -19,7 +19,9 @@ var MIT_LICENSE = ["Permission is hereby granted, free of charge, to any person


module.exports = function(str) {
if (str.indexOf('MIT') > -1 || str.indexOf(MIT_LICENSE) > -1) {
if (typeof str == 'undefined') {
return 'Undefined';
} else if (str.indexOf('MIT') > -1 || str.indexOf(MIT_LICENSE) > -1) {
return 'MIT*';
} else if (str.indexOf('BSD') > -1) {
return 'BSD*';
Expand Down

0 comments on commit 40d6e25

Please sign in to comment.