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

Autofill guid migration #4215

Merged
merged 1 commit into from
Sep 23, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions app/sessionStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,28 @@ module.exports.loadAppState = () => {
})
data.autofill.creditCards = creditCards
}
if (data.autofill.addresses.guid) {
let guids = []
data.autofill.addresses.guid.forEach((guid) => {
if (typeof guid === 'object') {
guids.push(guid['persist:default'])
} else {
guids.push(guid)
}
})
data.autofill.addresses.guid = guids
}
if (data.autofill.creditCards.guid) {
let guids = []
data.autofill.creditCards.guid.forEach((guid) => {
if (typeof guid === 'object') {
guids.push(guid['persist:default'])
} else {
guids.push(guid)
}
})
data.autofill.creditCards.guid = guids
}
}
// xml migration
if (data.settings) {
Expand Down
1 change: 0 additions & 1 deletion js/components/frame.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ class Frame extends ImmutableComponent {
const guids = this.props.autofillAddresses.get('guid')
let list = []
guids.forEach((entry) => {
console.log(entry)
const address = currentWindow.webContents.session.autofill.getProfile(entry)
const valid = Object.getOwnPropertyNames(address).length > 0
let addressDetail = {
Expand Down