match never returns empty arrays. Actually fix #61.

This commit is contained in:
Nicolas Stepien 2011-12-18 03:00:14 +01:00
parent 28a4761d1b
commit 00a6ea6467
2 changed files with 2 additions and 2 deletions

View File

@ -2231,7 +2231,7 @@
sauce = { sauce = {
init: function() { init: function() {
if (!(sauce.prefixes = conf['flavors'].match(/^[^#].+$/gm)).length) return; if (!(sauce.prefixes = conf['flavors'].match(/^[^#].+$/gm))) return;
sauce.names = sauce.prefixes.map(function(prefix) { sauce.names = sauce.prefixes.map(function(prefix) {
return prefix.match(/(\w+)\./)[1]; return prefix.match(/(\w+)\./)[1];
}); });

View File

@ -1790,7 +1790,7 @@ anonymize =
sauce = sauce =
init: -> init: ->
return unless (sauce.prefixes = conf['flavors'].match /^[^#].+$/gm).length return unless sauce.prefixes = conf['flavors'].match /^[^#].+$/gm
sauce.names = sauce.prefixes.map (prefix) -> prefix.match(/(\w+)\./)[1] sauce.names = sauce.prefixes.map (prefix) -> prefix.match(/(\w+)\./)[1]
g.callbacks.push (root) -> g.callbacks.push (root) ->
return if root.className is 'inline' or not span = $ '.filesize', root return if root.className is 'inline' or not span = $ '.filesize', root