Permalink
Browse files

Narrowed the wordSeparator logic [#105]

  • Loading branch information...
1 parent bd42f80 commit 47dc26620e54592d5eda42b3fd8ce5cd7069b3b9 @rmm5t committed Dec 27, 2012
Showing with 2 additions and 10 deletions.
  1. +2 −10 jquery.timeago.js
View
@@ -86,16 +86,8 @@
years < 1.5 && substitute($l.year, 1) ||
substitute($l.years, Math.round(years));
- switch ($l.wordSeparator) {
- case undefined:
- var separator = " ";
- break;
- case null:
- var separator = "";
- break;
- default:
- var separator = $l.wordSeparator;
- }
+ var separator = $l.wordSeparator || "";
+ if ($l.wordSeparator === undefined) { separator = " "; }
return $.trim([prefix, words, suffix].join(separator));
},
parse: function(iso8601) {

0 comments on commit 47dc266

Please sign in to comment.