Fix search for closest

This commit is contained in:
rachel-fenichel
2016-03-11 13:13:34 -08:00
parent 23df4765c0
commit 50975170d7
3 changed files with 10 additions and 12 deletions

View File

@@ -260,7 +260,8 @@ function helper_searchDB(db, x, y, radius, shared_workspace) {
var tempConn = helper_createConnection(x, y,
Blockly.NEXT_STATEMENT, shared_workspace);
tempConn.sourceBlock_ = helper_makeSourceBlock(shared_workspace);
return db.searchForClosest(tempConn, radius, 0, 0);
var closest = db.searchForClosest(tempConn, radius, 0, 0);
return closest.connection;
}
function helper_makeSourceBlock(sharedWorkspace) {