Skip to content

Commit 95c8aee

Browse files
authored
Merge pull request freelawproject#403 from ttys0dev/fix-set-default-firefox
Fix setDefaultOptions in updateToolbarButton
2 parents b714080 + 4d1a8f5 commit 95c8aee

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

CHANGES.md

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Fixes:
1414
- Corrected typo in build script, ensuring correct favicon path for Firefox releases([379](https://github.com/freelawproject/recap/issues/379), [397](https://github.com/freelawproject/recap-chrome/pull/397))
1515
- Refines the generateFileName method to accurately compute zip file names ([366](https://github.com/freelawproject/recap/issues/366), [399](https://github.com/freelawproject/recap-chrome/pull/399)).
1616
- Improves the reliability of PACER case ID retrieval on attachment pages ([369](https://github.com/freelawproject/recap/issues/369), [400](https://github.com/freelawproject/recap-chrome/pull/400)).
17+
- Fix setDefaultOptions in updateToolbarButton([403](https://github.com/freelawproject/recap-chrome/pull/403))
1718

1819

1920
For developers:

src/utils/toolbar_button.js

+7-6
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,13 @@ export function updateToolbarButton(tab) {
3131
};
3232

3333
chrome.storage.local.get('options', function (items) {
34+
if (!Object.keys(items).length) {
35+
// Firefox 56 bug. The default settings didn't get created properly when
36+
// upgrading from the legacy extension. This can be removed when everybody
37+
// is safely beyond 56 (and the ESR)
38+
setDefaultOptions({});
39+
}
40+
3441
if (
3542
'dismiss_news_badge' in items['options'] &&
3643
items['options']['dismiss_news_badge']
@@ -52,12 +59,6 @@ export function updateToolbarButton(tab) {
5259
});
5360
return;
5461
}
55-
if (!Object.keys(items).length) {
56-
// Firefox 56 bug. The default settings didn't get created properly when
57-
// upgrading from the legacy extension. This can be removed when everybody
58-
// is safely beyond 56 (and the ESR)
59-
setDefaultOptions({});
60-
}
6162

6263
if (items && items['options'] && !items['options']['recap_enabled']) {
6364
setTitleIcon('RECAP is temporarily disabled', {

0 commit comments

Comments
 (0)