mirror of
https://github.com/google/blockly.git
synced 2026-01-19 06:47:12 +01:00
fix: display the correct variable reference count when deleting a variable. (#8549)
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user