Skip to content

Commit 888ff0b

Browse files
committed
Only close dialog when open
1 parent 9380578 commit 888ff0b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/js/tabs/onboard_logging.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,10 @@ onboard_logging.initialize = function (callback) {
610610
flash_update_summary(function () {
611611
if (CONFIGURATOR.connectionValid && !eraseCancelled) {
612612
if (FC.DATAFLASH.ready) {
613-
$(".dataflash-confirm-erase")[0].close();
613+
const dialog = $(".dataflash-confirm-erase")[0];
614+
if (dialog?.open) {
615+
dialog.close();
616+
}
614617
if (getConfig("showNotifications").showNotifications) {
615618
NotificationManager.showNotification("Betaflight Configurator", {
616619
body: i18n.getMessage("flashEraseDoneNotification"),

0 commit comments

Comments
 (0)