mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-09-30 14:52:36 -05:00
Prevent empty highlights (#728)
This commit is contained in:
committed by
Guangcong Luo
parent
1f57fbf842
commit
0e69fc76fd
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user