mirror of
https://github.com/google/blockly.git
synced 2026-01-06 08:30:13 +01:00
Clean up temporary generator data.
This commit is contained in:
@@ -122,6 +122,10 @@ Blockly.Dart.finish = function(code) {
|
||||
definitions.push(def);
|
||||
}
|
||||
}
|
||||
// Clean up temporary data.
|
||||
delete Blockly.Dart.definitions_;
|
||||
delete Blockly.Dart.functionNames_;
|
||||
Blockly.Dart.variableDB_.reset();
|
||||
var allDefs = imports.join('\n') + '\n\n' + definitions.join('\n\n');
|
||||
return allDefs.replace(/\n\n+/g, '\n\n').replace(/\n*$/, '\n\n\n') + code;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user