| Index: lib/filterClasses.js |
| =================================================================== |
| --- a/lib/filterClasses.js |
| +++ b/lib/filterClasses.js |
| @@ -663,16 +663,17 @@ |
| // Despite this property being cached, the getter is called |
| // several times on Safari, due to WebKit bug 132872 |
| let prop = Object.getOwnPropertyDescriptor(this, "regexp"); |
| if (prop) |
| return prop.value; |
| let source = Filter.toRegExp(this.regexpSource); |
| let regexp = new RegExp(source, this.matchCase ? "" : "i"); |
| + delete this.regexpSource; |
|
kzar
2018/05/24 13:43:24
Nit: I'd prefer we did this after the defineProper
Manish Jethani
2018/05/25 03:43:36
Yup, me too.
|
| Object.defineProperty(this, "regexp", {value: regexp}); |
| return regexp; |
| }, |
| /** |
| * Content types the filter applies to, combination of values from |
| * RegExpFilter.typeMap |
| * @type {number} |
| */ |