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 c7d7531
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/js/tabs/firmware_flasher.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import $ from 'jquery';
import { i18n } from '../localization';
import GUI, { TABS } from '../gui';
import { get as getConfig, set as setConfig } from '../ConfigStorage';
import { get as getConfig, set as setConfig, remove as removeConfig } from '../ConfigStorage';
import { get as getStorage, set as setStorage } from '../SessionStorage';
import BuildApi from '../BuildApi';
import ConfigInserter from "../ConfigInserter.js";
Expand Down 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 c7d7531

Please sign in to comment.