Skip to content

Commit

Permalink
Merge pull request #5018 from brave/fix_import_crash_from_welcome_ui
Browse files Browse the repository at this point in the history
Fixed crash while importing from welcome ui
  • Loading branch information
bsclifton committed Apr 13, 2020
1 parent 95ddb2e commit 1ce6282
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion components/brave_welcome_ui/reducers/welcome_reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,20 @@ const welcomeReducer: Reducer<Welcome.State | undefined> = (state: Welcome.State
const startingState = state
switch (action.type) {
case types.IMPORT_BROWSER_DATA_REQUESTED:
chrome.send('importData', [payload])
const importTypes = {
import_dialog_autofill_form_data: true,
import_dialog_bookmarks: true,
import_dialog_history: true,
import_dialog_saved_passwords: true,
import_dialog_search_engine: true,
// TODO(simonhong): Remove below import types when we stop supporting
// import from muon.
import_dialog_cookies: false,
import_dialog_stats: false,
import_dialog_ledger: false,
import_dialog_windows: false
}
chrome.send('importData', [payload, importTypes])
break
case types.GO_TO_TAB_REQUESTED:
window.open(payload.url, payload.target)
Expand Down

0 comments on commit 1ce6282

Please sign in to comment.