From bad2c768f2ec09ab4f6f4eb02650780049ddef0f Mon Sep 17 00:00:00 2001 From: Logan Smyth Date: Wed, 23 Mar 2016 20:57:18 -0700 Subject: [PATCH] Remove this check which will never pass with the new cache. --- packages/babel-traverse/src/path/index.js | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/packages/babel-traverse/src/path/index.js b/packages/babel-traverse/src/path/index.js index b1fb51b2e2..9b877eac05 100644 --- a/packages/babel-traverse/src/path/index.js +++ b/packages/babel-traverse/src/path/index.js @@ -84,18 +84,6 @@ export default class NodePath { } } - 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. Possibly due to bad serialisation."); - } - } - if (!path) { path = new NodePath(hub, parent); paths.push(path);