Skip to content

Commit

Permalink
Merge pull request brave#4215 from darkdh/autofill-guid-migration
Browse files Browse the repository at this point in the history
Autofill guid migration
  • Loading branch information
bbondy authored Sep 23, 2016
2 parents bb799de + cdd785a commit 5cf9c4b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
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

0 comments on commit 5cf9c4b

Please sign in to comment.