Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
Fix importing bookmarks not importing anything
Browse files Browse the repository at this point in the history
When old site didn't exist it would error early and not import anything on the undefined.get()  access.

Related to #4879

Auditors: @darkdh
  • Loading branch information
bbondy committed Jan 29, 2017
1 parent ab4f211 commit 048c617
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/state/siteUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ const mergeSiteDetails = (oldSiteDetail, newSiteDetail, tag, folderId, order) =>
let lastAccessedTime
if (isBookmark(tag) || isBookmarkFolder(tag)) {
siteDetailExist
? lastAccessedTime = newSiteDetail.get('lastAccessedTime') || oldSiteDetail.get('lastAccessedTime')
? lastAccessedTime = newSiteDetail.get('lastAccessedTime') || oldSiteDetail && oldSiteDetail.get('lastAccessedTime') || 0
: lastAccessedTime = 0
} else {
lastAccessedTime = newSiteDetail.get('lastAccessedTime') || new Date().getTime()
Expand Down

2 comments on commit 048c617

@darkdh
Copy link
Member

@darkdh darkdh commented on 048c617 Jan 29, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

++

@bsclifton
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

++!

Please sign in to comment.