diff --git a/core/variables.ts b/core/variables.ts index bad87df0b..8c06a8d91 100644 --- a/core/variables.ts +++ b/core/variables.ts @@ -747,7 +747,13 @@ export function deleteVariable( if ((triggeringBlock && uses.length) || uses.length > 1) { // Confirm before deleting multiple blocks. const confirmText = Msg['DELETE_VARIABLE_CONFIRMATION'] - .replace('%1', String(uses.length + (triggeringBlock ? 1 : 0))) + .replace( + '%1', + String( + uses.length + + (triggeringBlock && !triggeringBlock.workspace.isFlyout ? 1 : 0), + ), + ) .replace('%2', variableName); dialog.confirm(confirmText, (ok) => { if (ok && variable) {