Skip to content

Commit

Permalink
fix: Regex match empty level #38 (#39)
Browse files Browse the repository at this point in the history
* fix: Regex match empty level #38

* fix when wildecard is #
  • Loading branch information
robertsLando authored Apr 3, 2020
1 parent 04886a2 commit bb19385
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion persistence.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ MongoPersistence.prototype.createRetainedStreamCombi = function (patterns) {

for (let i = 0; i < patterns.length; i++) {
instance.matcher.add(patterns[i], true)
regex.push(escape(patterns[i]).replace(/(#|\\\+).*$/, ''))
regex.push(escape(patterns[i]).replace(/(\/*#|\\\+).*$/, ''))
}

regex = regex.join('|')
Expand Down

0 comments on commit bb19385

Please sign in to comment.