mirror of
https://github.com/google/blockly.git
synced 2026-01-10 02:17:09 +01:00
Prevent collisions between user functions and helper functions.
This commit is contained in:
@@ -251,7 +251,7 @@ Blockly.JavaScript['math_on_list'] = function(block) {
|
||||
code = 'Math.max.apply(null, ' + list + ')';
|
||||
break;
|
||||
case 'AVERAGE':
|
||||
// math_median([null,null,1,3]) == 2.0.
|
||||
// mathMean([null,null,1,3]) == 2.0.
|
||||
var functionName = Blockly.JavaScript.provideFunction_(
|
||||
'mathMean',
|
||||
[ 'function ' + Blockly.JavaScript.FUNCTION_NAME_PLACEHOLDER_ +
|
||||
@@ -264,7 +264,7 @@ Blockly.JavaScript['math_on_list'] = function(block) {
|
||||
code = functionName + '(' + list + ')';
|
||||
break;
|
||||
case 'MEDIAN':
|
||||
// math_median([null,null,1,3]) == 2.0.
|
||||
// mathMedian([null,null,1,3]) == 2.0.
|
||||
var functionName = Blockly.JavaScript.provideFunction_(
|
||||
'mathMedian',
|
||||
[ 'function ' + Blockly.JavaScript.FUNCTION_NAME_PLACEHOLDER_ +
|
||||
|
||||
Reference in New Issue
Block a user