babel-traverse
Advanced tools
Comparing version 6.0.14 to 6.0.16
@@ -97,2 +97,14 @@ /* @flow */ | ||
if (path && !(path instanceof NodePath)) { | ||
if (path.constructor.name === "NodePath") { | ||
// we're going to absolutley thrash the tree and allocate way too many node paths | ||
// than is necessary but there's no way around this as the node module resolution | ||
// algorithm is ridiculous | ||
path = null; | ||
} else { | ||
// badly deserialised probably | ||
throw new Error("We found a path that isn't a NodePath instance. Possiblly due to bad serialisation."); | ||
} | ||
} | ||
if (!path) { | ||
@@ -103,6 +115,2 @@ path = new NodePath(hub, parent); | ||
if (!(path instanceof NodePath)) { | ||
throw new Error("We found a path that isn't a NodePath instance"); | ||
} | ||
path.setup(parentPath, container, listKey, key); | ||
@@ -109,0 +117,0 @@ |
{ | ||
"name": "babel-traverse", | ||
"version": "6.0.14", | ||
"version": "6.0.16", | ||
"description": "", | ||
@@ -21,2 +21,2 @@ "author": "Sebastian McKenzie <sebmck@gmail.com>", | ||
} | ||
} | ||
} |
158644
4497