Prevent regexp errors with the filter.
This commit is contained in:
parent
bc57aa561f
commit
fbfdefa3e0
@ -537,7 +537,12 @@
|
||||
for (_i = 0, _len = m.length; _i < _len; _i++) {
|
||||
filter = m[_i];
|
||||
f = filter.match(/^\/(.+)\/(\w*)$/);
|
||||
this.regexps[key].push(RegExp(f[1], f[2]));
|
||||
try {
|
||||
this.regexps[key].push(RegExp(f[1], f[2]));
|
||||
} catch (e) {
|
||||
alert(e.message);
|
||||
alert(e);
|
||||
}
|
||||
}
|
||||
this.callbacks.push(this[key]);
|
||||
}
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
master
|
||||
- mayhem
|
||||
prevent regexp errors with the filter
|
||||
|
||||
2.32.3
|
||||
- mayhem
|
||||
|
||||
@ -401,7 +401,10 @@ filter =
|
||||
@regexps[key] = []
|
||||
for filter in m
|
||||
f = filter.match /^\/(.+)\/(\w*)$/
|
||||
@regexps[key].push RegExp f[1], f[2]
|
||||
try
|
||||
@regexps[key].push RegExp f[1], f[2]
|
||||
catch e
|
||||
alert e.message
|
||||
#only execute what's filterable
|
||||
@callbacks.push @[key]
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user