不要怂,就是干,撸起袖子干!

Commit 354c88ee by Sascha Depold

return the word if no replacement rule fits

1 parent 70551a5f
Showing with 2 additions and 2 deletions
...@@ -177,14 +177,14 @@ exports.singularize = function (word) { ...@@ -177,14 +177,14 @@ exports.singularize = function (word) {
return word; return word;
} }
} }
for (var i = 0; i < SINGULARS.length; i++) { for (var i = 0; i < SINGULARS.length; i++) {
var rule = SINGULARS[i][0], var rule = SINGULARS[i][0],
replacement = SINGULARS[i][1]; replacement = SINGULARS[i][1];
if (rule.test(word)) { if (rule.test(word)) {
return word.replace(rule, replacement); return word.replace(rule, replacement);
} }
} }
return word
} }
/** /**
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!