@babel/traverse 8.0.0 → 8.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js CHANGED
@@ -125,7 +125,7 @@ function _visit(ctx, path) {
125
125
  }
126
126
  path.shouldStop = traverseNode(path.node, opts, path.scope, ctx.state, path, path.skipKeys);
127
127
  if (path.node) {
128
- if (_call.call(path, opts.exit)) return true;
128
+ if (_call.call(path, opts.exit)) return path.shouldStop;
129
129
  }
130
130
  if (path.node) {
131
131
  _call.call(path, opts[node.type]?.exit);
@@ -424,7 +424,7 @@ function verify$1(visitor) {
424
424
  }
425
425
  if (shouldIgnoreKey(nodeType)) continue;
426
426
  if (!TYPES.includes(nodeType)) {
427
- throw new Error(`You gave us a visitor for the node type ${nodeType} but it's not a valid type in @babel/traverse ${"8.0.0"}`);
427
+ throw new Error(`You gave us a visitor for the node type ${nodeType} but it's not a valid type in @babel/traverse ${"8.0.4"}`);
428
428
  }
429
429
  const visitors = visitor[nodeType];
430
430
  if (typeof visitors === "object") {