Remove dependency on barely-used package.
This commit is contained in:
parent
62ee1adc85
commit
2854a187be
@ -16,7 +16,6 @@
|
||||
"@babel/types": "7.0.0-beta.53",
|
||||
"debug": "^3.1.0",
|
||||
"globals": "^11.1.0",
|
||||
"invariant": "^2.2.0",
|
||||
"lodash": "^4.17.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@ -2,7 +2,6 @@ import type Hub from "../hub";
|
||||
import type TraversalContext from "../context";
|
||||
import * as virtualTypes from "./lib/virtual-types";
|
||||
import buildDebug from "debug";
|
||||
import invariant from "invariant";
|
||||
import traverse from "../index";
|
||||
import Scope from "../scope";
|
||||
import * as t from "@babel/types";
|
||||
@ -76,7 +75,9 @@ export default class NodePath {
|
||||
hub = parentPath.hub;
|
||||
}
|
||||
|
||||
invariant(parent, "To get a node path the parent needs to exist");
|
||||
if (!parent) {
|
||||
throw new Error("To get a node path the parent needs to exist");
|
||||
}
|
||||
|
||||
const targetNode = container[key];
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user