Skip to content

Commit

Permalink
guard against empty find
Browse files Browse the repository at this point in the history
  • Loading branch information
dcsan committed Aug 10, 2015
1 parent 1e4c9cb commit c08cc08
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions nap/lib/utils/TextLib.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ var TextLib = {
},

dashedName: function(str) {
if (!str) return;
str = str.replace(/\s/g, "-");
str = str.toLowerCase();
str = str.replace('--', '-'); // in case of doubles
Expand Down

0 comments on commit c08cc08

Please sign in to comment.