Skip to content

Commit

Permalink
fix(content_delegate): Update the regex that gets the caseId from event
Browse files Browse the repository at this point in the history
Updates regex to remove invalid escape sequences and adds capturing groups to eliminate the replace method.
  • Loading branch information
ERosendo committed Nov 15, 2023
1 parent 8123a33 commit f956948
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/content_delegate.js
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ ContentDelegate.prototype.onDownloadAllSubmit = async function (event) {
// load options
const options = await getItemsFromStorage('options');
// generate the filename
const pacerCaseId = event.data.id.match(/caseid\=\d*/)[0].replace(/caseid\=/, '');
const pacerCaseId = event.data.id.match(/caseid=(\d*)/)[1];
const filename = generateFileName(options, pacerCaseId);

// show loading message
Expand Down

0 comments on commit f956948

Please sign in to comment.