Bug 1466873 - [tps] Allow date property be optional when matching history entries; r=markh

MozReview-Commit-ID: 98eR1XFYpwE

--HG--
extra : rebase_source : 21939f3abd0874bbcb4da0b5bb5b3d17fdee06a4
This commit is contained in:
Dave Hunt 2018-06-07 16:53:39 +01:00
Родитель 00b90ced7a
Коммит e5ebd847ca
1 изменённых файлов: 4 добавлений и 2 удалений

Просмотреть файл

@ -86,11 +86,13 @@ var HistoryEntry = {
for (let itemvisit of item.visits) {
// Note: in microseconds.
let expectedDate = itemvisit.date * 60 * 60 * 1000 * 1000 + msSinceEpoch * 1000;
if (visit.type == itemvisit.type && visit.date == expectedDate) {
if (visit.type == itemvisit.type) {
if (itemvisit.date === undefined || visit.date == expectedDate) {
itemvisit.found = true;
}
}
}
}
let all_items_found = true;
for (let itemvisit of item.visits) {