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

Clear state if clear autofill data when shutdown. #4827

Merged
merged 1 commit into from
Oct 15, 2016
Merged
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
5 changes: 5 additions & 0 deletions app/sessionStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,11 @@ module.exports.cleanAppData = (data, isShutdown) => {
const clearAutofillData = isShutdown && getSetting(settings.SHUTDOWN_CLEAR_AUTOFILL_DATA) === true
if (clearAutofillData) {
autofill.clearAutofillData()
const date = new Date().getTime()
Copy link
Collaborator

Choose a reason for hiding this comment

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

this works, but fyi you can just delete it because it will be-readded from the default session data

data.autofill.addresses.guid = []
data.autofill.addresses.timestamp = date
data.autofill.creditCards.guid = []
data.autofill.creditCards.timestamp = date
}
const clearSiteSettings = isShutdown && getSetting(settings.SHUTDOWN_CLEAR_SITE_SETTINGS) === true
if (clearSiteSettings) {
Expand Down