lsendel / blockly

Automatically exported from code.google.com/p/blockly
0 stars 0 forks source link

Opening procedure mutator in code demo throws error... 'use strict'? #82

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Append blockly to other things
2. minify
3. use in browser
4. open console
5. add either kind of procedure block
6. activate mutator [+]

What is the expected output? What do you see instead?

    I expect to see no errors in the console. I see 

        Uncaught ReferenceError: paramIds is not defined

    everything works, though! I think it's just a "use strict" hangover.

What browser are you using?

    Chrome 2200 OSX

Please provide any additional information below.

from the r483 baseline,

diff --git a/language/common/procedures.js b/language/common/procedures.js
index b8ba2b5..0b02bd2 100644
--- a/language/common/procedures.js
+++ b/language/common/procedures.js
@@ -102,7 +102,7 @@ Blockly.Language.procedures_defnoreturn = {
   },
   compose: function(containerBlock) {
     this.arguments_ = [];
-    paramIds = [];
+    var paramIds = [];
     var paramBlock = containerBlock.getInputTargetBlock('STACK');
     while (paramBlock) {
       this.arguments_.push(paramBlock.getTitleValue('NAME'));

Original issue reported on code.google.com by nick.bollweg@gmail.com on 18 Oct 2012 at 1:08

GoogleCodeExporter commented 8 years ago
Thanks!

Original comment by neil.fra...@gmail.com on 18 Oct 2012 at 1:37