mirror of
https://github.com/google/blockly.git
synced 2026-01-28 03:00:09 +01:00
chore: replace more uses of var with const and let (#5628)
* chore: fix uses of var in core/block_dragger * chore: fix uses of var in core/extensions.js * chore: fix uses of var in core/field_multilineinput.js * chore: fix uses of var in assorted core files * chore: fix uses of var in node test runner and playground screenshot code * fix: undefined return from measureFontMetrics * fix: violations of no-const-assign * chore: only one variable declaration per line
This commit is contained in:
@@ -413,8 +413,11 @@ const measureFontMetrics = function(text, fontSize, fontWeight, fontFamily) {
|
||||
div.appendChild(block);
|
||||
|
||||
document.body.appendChild(div);
|
||||
const result = {
|
||||
height: 0,
|
||||
baseline: 0,
|
||||
};
|
||||
try {
|
||||
var result = {};
|
||||
div.style.alignItems = 'baseline';
|
||||
result.baseline = block.offsetTop - span.offsetTop;
|
||||
div.style.alignItems = 'flex-end';
|
||||
|
||||
Reference in New Issue
Block a user