Skip to content

Commit

Permalink
feat(district): Clears docketNumber from localStorage
Browse files Browse the repository at this point in the history
This commit ensures that the docketNumber stored in localStorage is cleared when a user loads a district court report. This prevents potential issues where a stale docketNumber might be used on other pages or during subsequent validations.

This commit address  freelawproject/recap#392.
  • Loading branch information
ERosendo committed Feb 26, 2025
1 parent 5a76859 commit 0dcd05a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/content_delegate.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ ContentDelegate.prototype.findAndStorePacerDocIds = async function () {
}
if (PACER.isDocketQueryUrl(this.url) && page_pacer_case_id) {
payload['caseId'] = page_pacer_case_id;
payload['docketNumber'] = '';
}

updateTabStorage({
Expand Down
1 change: 1 addition & 0 deletions src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ const saveCaseIdinTabStorage = async (object, case_id) => {
const { tabId } = object;
const payload = {
caseId: case_id,
docketNumber: '',
};
await updateTabStorage({
[tabId]: payload,
Expand Down

0 comments on commit 0dcd05a

Please sign in to comment.