Skip to content

Commit

Permalink
fix for literal values of variables changing instance names
Browse files Browse the repository at this point in the history
  • Loading branch information
dethe committed Apr 13, 2015
1 parent ebd762e commit 5c41779
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion js/block.js
Expand Up @@ -184,6 +184,10 @@ function handleVariableInput(evt){
if (! dom.matches(stepBlock, '[script="control.setVariable"]')){
return;
}
// keep from literal value matching
if (! dom.matches(input.parentElement, ':first-of-type')){
return;
}
var context = dom.closest(stepBlock, 'wb-contains');
var newVariableName = input.value;
updateVariableNameInInstances(newVariableName, getVariablesToUpdate(context, stepBlock.id));
Expand Down Expand Up @@ -868,7 +872,6 @@ function endDragBlock(evt){
origTarget = null;
}
if (!dropTarget){
// console.log('no dropTarget');
if(dragTarget){
dragTarget.parentElement.removeChild(dragTarget);
}
Expand Down

0 comments on commit 5c41779

Please sign in to comment.