Skip to content

Commit 803a7e5

Browse files
authored
Merge pull request #1630 from stevex86/fix/extract-signature-throws-on-multiple-runs
Fix regex state causing subsequent runs of Tag.extractSignature to fail
2 parents 3326e1d + 2f099c8 commit 803a7e5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/tag.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ Tag.prototype.extractSignature = function(signatureType = "gpgsig") {
123123
const odbData = odbObject.toString();
124124

125125
for (const regex of signatureRegexes) {
126-
const matchResult = regex.exec(odbData);
126+
const matchResult = odbData.match(regex);
127127

128128
if (matchResult !== null) {
129129
return matchResult[0];

0 commit comments

Comments
 (0)