mirror of
https://github.com/scratchfoundation/scratch-blocks.git
synced 2025-08-28 22:10:31 -04:00
Initialize additionalVars in case it isn't provided. This is necessary for the vertical playground for example.
This commit is contained in:
parent
83af7c0c18
commit
768b5e1b09
1 changed files with 1 additions and 0 deletions
|
@ -291,6 +291,7 @@ Blockly.Variables.createVariable = function(workspace, opt_callback, opt_type) {
|
|||
Blockly.prompt(newMsg, '',
|
||||
function(text, scope, additionalVars) {
|
||||
var isLocal = (scope === 'local') || false;
|
||||
additionalVars = additionalVars || [];
|
||||
var validatedText = validate(text, workspace, additionalVars, opt_callback);
|
||||
if (validatedText) {
|
||||
// The name is valid according to the type, create the variable
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue