File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -25,9 +25,9 @@ const features = {
2525// Storage for fixed/extended native methods
2626const fixed = { } ;
2727// Storage for regexes cached by `XRegExp.cache`
28- let regexCache = { } ;
28+ let regexCache = Object . create ( null ) ;
2929// Storage for pattern details cached by the `XRegExp` constructor
30- let patternCache = { } ;
30+ let patternCache = Object . create ( null ) ;
3131// Storage for regex syntax tokens added internally or by `XRegExp.addToken`
3232const tokens = [ ] ;
3333// Token scopes
@@ -774,10 +774,10 @@ XRegExp.cache = (pattern, flags) => {
774774XRegExp . cache . flush = ( cacheName ) => {
775775 if ( cacheName === 'patterns' ) {
776776 // Flush the pattern cache used by the `XRegExp` constructor
777- patternCache = { } ;
777+ patternCache = Object . create ( null ) ;
778778 } else {
779779 // Flush the regex cache populated by `XRegExp.cache`
780- regexCache = { } ;
780+ regexCache = Object . create ( null ) ;
781781 }
782782} ;
783783
You can’t perform that action at this time.
0 commit comments