Migrate core/keyboard_nav/tab_navigate_cursor.js to ES6 const/let

This commit is contained in:
kozbial
2021-07-20 16:45:30 -07:00
committed by Monica Kozbial
parent 8d6f2626cd
commit 9d6cbe96d3

View File

@@ -37,10 +37,10 @@ Blockly.utils.object.inherits(Blockly.TabNavigateCursor, Blockly.BasicCursor);
* @override
*/
Blockly.TabNavigateCursor.prototype.validNode_ = function(node) {
var isValid = false;
var type = node && node.getType();
let isValid = false;
const type = node && node.getType();
if (node) {
var location = /** @type {Blockly.Field} */ (node.getLocation());
const location = /** @type {Blockly.Field} */ (node.getLocation());
if (type == Blockly.ASTNode.types.FIELD &&
location && location.isTabNavigable() && location.isClickable()) {
isValid = true;