Fix var rename bug where variable would go back to old name after switching sprites.

This commit is contained in:
Karishma Chadha 2018-07-15 18:58:56 -04:00
parent bf22cdbf13
commit a8fc399746

View file

@ -354,7 +354,7 @@ class Blocks {
}
break;
case 'var_rename':
if (editingTarget && editingTarget.hasOwnProperty(e.varId)) {
if (editingTarget && editingTarget.variables.hasOwnProperty(e.varId)) {
// This is a local variable, rename on the current target
editingTarget.renameVariable(e.varId, e.newName);
// Update all the blocks on the current target that use