mirror of
https://github.com/google/blockly.git
synced 2026-01-07 09:00:11 +01:00
Update block_exporter_controller.js
Generator stub file type is set to javascript; unnecesarry conditions removed.
This commit is contained in:
committed by
Andrew n marshall
parent
4bbd83820c
commit
97daddb01e
@@ -132,18 +132,16 @@ BlockExporterController.prototype.export = function() {
|
||||
BlocklyDevTools.Analytics.onWarning(msg);
|
||||
alert(msg);
|
||||
} else {
|
||||
|
||||
// Get generator stub code in the selected language for the blocks.
|
||||
var genStubs = this.tools.getGeneratorCode(blockXmlMap,
|
||||
language);
|
||||
// Get the correct file extension.
|
||||
var fileType = (language == 'JavaScript') ? 'javascript' : 'plain';
|
||||
|
||||
// Download the file.
|
||||
FactoryUtils.createAndDownloadFile(
|
||||
genStubs, generatorStub_filename + '.js', fileType);
|
||||
genStubs, generatorStub_filename + '.js', 'javascript');
|
||||
BlocklyDevTools.Analytics.onExport(
|
||||
BlocklyDevTools.Analytics.GENERATOR,
|
||||
(fileType == 'javascript' ?
|
||||
{ format: BlocklyDevTools.Analytics.FORMAT_JS } : undefined));
|
||||
BlocklyDevTools.Analytics.GENERATOR, { format: BlocklyDevTools.Analytics.FORMAT_JS });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user