diff --git a/src/pushprocessor.js b/src/pushprocessor.js index 7ba4d0a06..2579de5c8 100644 --- a/src/pushprocessor.js +++ b/src/pushprocessor.js @@ -232,6 +232,9 @@ function PushProcessor(client) { }; const createCachedRegex = function(prefix, glob, suffix) { + if (cachedGlobToRegex[glob]) { + return cachedGlobToRegex[glob]; + } cachedGlobToRegex[glob] = new RegExp( prefix + globToRegexp(glob) + suffix, 'i', // Case insensitive