From fd1cb4b9bd17cee83b5acc86fd0e53025894b6e5 Mon Sep 17 00:00:00 2001 From: James Campos Date: Sat, 10 Sep 2011 02:33:46 -0700 Subject: [PATCH] fix error when sauces deleted; close #273 --- 4chan_x.user.js | 2 +- script.coffee | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index d84420db9..7dbe40bdf 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -1997,7 +1997,7 @@ _results = []; for (_i = 0, _len = _ref.length; _i < _len; _i++) { s = _ref[_i]; - if (s[0] !== '#') { + if (s && s[0] !== '#') { _results.push(s); } } diff --git a/script.coffee b/script.coffee index 4d2d517fe..ab4ac8cff 100644 --- a/script.coffee +++ b/script.coffee @@ -1590,7 +1590,7 @@ anonymize = sauce = init: -> - sauce.prefixes = (s for s in (conf['flavors'].split '\n') when s[0] != '#') + sauce.prefixes = (s for s in (conf['flavors'].split '\n') when s and s[0] != '#') sauce.names = (prefix.match(/(\w+)\./)[1] for prefix in sauce.prefixes) g.callbacks.push (root) -> return if root.className is 'inline'