fix(blocks): use static tooltip for controls_ifelse block (#9897)

The controls_ifelse block was using the controls_if_tooltip dynamic
extension, which reads this.elseifCount_ and this.elseCount_ set by
the controls_if_mutator. Since controls_ifelse has no mutator, both
counts are undefined and the extension always returned TOOLTIP_1 (for
a simple if), instead of TOOLTIP_2 (for if/else).

The static tooltip already declared on the block was unreachable
because of a typo (BKYCONTROLS_IF_TOOLTIP_2 was missing the underscore
after BKY) and would have been overridden by the extension anyway.

Fix the message key typo and drop the extension so the static
TOOLTIP_2 string is displayed instead.

Fixes #9813

Signed-off-by: sheitabrk <44614193+sheitabrk@users.noreply.github.com>
This commit is contained in:
Sheita
2026-05-19 17:11:16 +02:00
committed by GitHub
parent b6d8ed6317
commit 2f1acb3ef1
+1 -2
View File
@@ -100,10 +100,9 @@ export const blocks = createBlockDefinitionsFromJsonArray([
'previousStatement': null,
'nextStatement': null,
'style': 'logic_blocks',
'tooltip': '%{BKYCONTROLS_IF_TOOLTIP_2}',
'tooltip': '%{BKY_CONTROLS_IF_TOOLTIP_2}',
'helpUrl': '%{BKY_CONTROLS_IF_HELPURL}',
'suppressPrefixSuffix': true,
'extensions': ['controls_if_tooltip'],
},
// Block for comparison operator.
{