Skip to content
This repository was archived by the owner on Sep 30, 2021. It is now read-only.

Commit 0c7f9f3

Browse files
committed
Small fixes
- Adapt check groups for Chrome - Add Error Boundary on other front files - Force enable on lomanager tests
1 parent 8afbfea commit 0c7f9f3

File tree

4 files changed

+13
-3
lines changed

4 files changed

+13
-3
lines changed

extension/background/core/groupmanager.js

+6-3
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ GroupManager.updateLastAccessedFromTabs = function(groups = GroupManager.groups)
426426
for (let g of groups) {
427427
let lastAccessed = g.lastAccessed;
428428
for (let tab of g.tabs) { // If no tab, keep the old value
429-
if (tab.lastAccessed > lastAccessed) {
429+
if (tab.lastAccessed != null && tab.lastAccessed > lastAccessed) {
430430
lastAccessed = tab.lastAccessed;
431431
}
432432
}
@@ -1028,10 +1028,13 @@ GroupManager.checkCorruptedGroups = function(groups=GroupManager.groups, {
10281028
withMessage=false,
10291029
}={}) {
10301030
const checkCorruptedTab = function(tab, index) {
1031-
const properties = [ "title", "url", "hidden", "lastAccessed", "pinned", "windowId", "active", "id"];
1031+
const properties = [ "title", "url", "pinned", "windowId", "active", "id"];
10321032
if( Utils.isChrome() || Utils.isFF57()) {
10331033
properties.push("discarded")
10341034
}
1035+
if (!Utils.isChrome()) {
1036+
properties.push("lastAccessed")
1037+
}
10351038
return Utils.ojectPropertiesAreUndefined(
10361039
tab,
10371040
properties,
@@ -1046,7 +1049,7 @@ GroupManager.checkCorruptedGroups = function(groups=GroupManager.groups, {
10461049
if (results.length === 0) {
10471050
return [false, ""];
10481051
} else {
1049-
return [true, prefix + "." + results.map(([is, msg])=> msg).join(',')];
1052+
return [true, results.map(([is, msg])=> `${prefix}.${msg}`).join(',')];
10501053
}
10511054
}
10521055

extension/tabpages/manage-groups/manage-groups.html

+2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
<script src="/background/error/errorListenerFront.js"></script>
2222
<script src="/background/utils/utils.js"></script>
2323

24+
<script src="/share/components/ErrorBoundary.js"></script>
25+
2426
<script src="/share/components/groups/wrapper/action_creators.js"></script>
2527
<script src="/share/components/groups/wrapper/reducer.js"></script>
2628
<script src="/share/components/groups/wrapper/group-actions.js"></script>

extension/tabpages/selector-groups/selector-groups.html

+2
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@
4141
<script src="/share/components/groups/wrapper/navigation.js"></script>
4242
-->
4343

44+
<script src="/share/components/ErrorBoundary.js"></script>
45+
4446
<script src="/share/components/groups/searchbar.js"></script>
4547
<script src="/share/components/groups/grouplist.js"></script>
4648
<script src="/share/components/groups/group.js"></script>

extension/tests/tests/unit/test_logmanager.js

+3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ describe("Logmanager", () => {
1313
logs,
1414
print: false,
1515
showNotification: false,
16+
enable: true,
1617
})
1718

1819
expect(logs[0].type).toBe('Error')
@@ -27,6 +28,7 @@ describe("Logmanager", () => {
2728
logs,
2829
print: false,
2930
showNotification: false,
31+
enable: true,
3032
})
3133

3234
expect(logs.length).toBe(1);
@@ -44,6 +46,7 @@ describe("Logmanager", () => {
4446
logs,
4547
print: false,
4648
showNotification: false,
49+
enable: true,
4750
})
4851

4952
expect(logs.length).toBe(1);

0 commit comments

Comments
 (0)