fix ancestry index loopup in Path#getEarliestCommonAncestorFrom

This commit is contained in:
Sebastian McKenzie 2015-06-17 02:07:35 +01:00
parent b57a80ecae
commit 25c2816a85

View File

@ -37,7 +37,7 @@ export function getEarliestCommonAncestorFrom(paths: Array<NodePath>): NodePath
var keys = t.VISITOR_KEYS[deepest.type];
for (var ancestry of (ancestries: Array)) {
var path = ancestry[i - 0];
var path = ancestry[i + 1];
if (!earliest) {
earliest = path;