From 0e69fc76fd213c00f418af30060889dc3b4e6a4d Mon Sep 17 00:00:00 2001 From: QuiteQuiet Date: Thu, 16 Jun 2016 03:37:49 +0200 Subject: [PATCH] Prevent empty highlights (#728) --- js/client-chat.js | 1 + 1 file changed, 1 insertion(+) diff --git a/js/client-chat.js b/js/client-chat.js index ffe6fda05..21816ee5f 100644 --- a/js/client-chat.js +++ b/js/client-chat.js @@ -658,6 +658,7 @@ switch (targets[0]) { case 'add': for (var i = 1, len = targets.length; i < len; i++) { + if (!targets[i]) continue; if (/[\\^$*+?()|{}[\]]/.test(targets[i])) { // Catch any errors thrown by newly added regular expressions so they don't break the entire highlight list try {