mirror of
https://github.com/google/blockly.git
synced 2026-01-07 00:50:27 +01:00
chore: correctly updates the compiled flag (#5767)
This commit is contained in:
@@ -183,11 +183,6 @@ goog.require('Blockly.Events.VarCreate');
|
||||
*/
|
||||
exports.VERSION = 'uncompiled';
|
||||
|
||||
/**
|
||||
* @define {boolean} Overridden to true by the compiler.
|
||||
*/
|
||||
const COMPILED = false;
|
||||
|
||||
// Add a getter and setter pair for Blockly.alert, Blockly.confirm,
|
||||
// Blockly.mainWorkspace, Blockly.prompt and Blockly.selected for backwards
|
||||
// compatibility.
|
||||
@@ -733,6 +728,7 @@ exports.zelos = zelos;
|
||||
// accessors are nonconfigurable (which is good, as otherwise one
|
||||
// accessors on one copy would call get/set functions on the other
|
||||
// copy!)
|
||||
/* eslint-disable-next-line no-undef */
|
||||
if (!COMPILED && typeof globalThis['Blockly'] === 'object' &&
|
||||
globalThis['Blockly'] !== exports) {
|
||||
const descriptors = Object.getOwnPropertyDescriptors(exports);
|
||||
|
||||
@@ -457,6 +457,7 @@ function compile(options) {
|
||||
language_out: 'ECMASCRIPT5_STRICT',
|
||||
rewrite_polyfills: true,
|
||||
hide_warnings_for: 'node_modules',
|
||||
define: ['COMPILED=true'],
|
||||
externs: ['./externs/svg-externs.js'],
|
||||
};
|
||||
if (argv.debug || argv.strict) {
|
||||
|
||||
Reference in New Issue
Block a user