fixing crash when utils.slugify is called with a null value

This commit is contained in:
Julian Lam
2015-02-24 21:11:25 -05:00
parent cf6b32bce6
commit 89bf036262

View File

@@ -75,6 +75,7 @@
//http://dense13.com/blog/2009/05/03/converting-string-to-slug-javascript/
slugify: function(str) {
if (!str) { str = ''; }
str = str.replace(utils.trimRegex, '');
if(utils.isLatin.test(str)) {
str = str.replace(utils.invalidLatinChars, '-');