Skip to content

Commit

Permalink
Set erase_chip as default option when not set before
Browse files Browse the repository at this point in the history
  • Loading branch information
haslinghuis committed Dec 29, 2023
1 parent 6577697 commit ecfe9f3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ function cleanupLocalStorage() {
'selected_board',
'unifiedConfigLast',
'unifiedSourceCache',
'erase_chip',
];

for (const key in localStorage) {
Expand Down
4 changes: 2 additions & 2 deletions src/js/tabs/firmware_flasher.js
Original file line number Diff line number Diff line change
Expand Up @@ -575,10 +575,10 @@ firmware_flasher.initialize = function (callback) {
}

let result = getConfig('erase_chip');
if (result.erase_chip) {
if (result.erase_chip === undefined) {
$('input.erase_chip').prop('checked', true);
} else {
$('input.erase_chip').prop('checked', false);
$('input.erase_chip').prop('checked', result.erase_chip);
}

$('input.erase_chip').change(function () {
Expand Down

0 comments on commit ecfe9f3

Please sign in to comment.