Skip to content

Commit cc42ffc

Browse files
FannonSimon Heimler
and
Simon Heimler
authored
Fix potential crash when browser returns empty history entries (#144)
Co-authored-by: Simon Heimler <[email protected]>
1 parent 88cb890 commit cc42ffc

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## [unreleased]
44

5+
- **FIXED**: Fixed potential crash when browser returns empty history entries (which it shouldn't do).
6+
57
## [v1.10.2]
68

79
- **FIXED**: Bookmark tagging autocomplete was partly broken. Fixed update of dependency.

popup/js/model/searchData.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ export async function getSearchData() {
8383
const browserHistory = []
8484
const idMap = {}
8585
for (const item of historyFromApi.concat(historyC)) {
86-
if (!idMap[item.id || item.url]) {
86+
if (item && item.id & !idMap[item.id]) {
8787
browserHistory.push(item)
88-
idMap[item.id || item.url] = true
88+
idMap[item.id] = true
8989
}
9090
}
9191

0 commit comments

Comments
 (0)