@babel/traverse 8.0.0-alpha.6 → 8.0.0-alpha.7
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 +7 -4
- package/lib/index.js.map +1 -1
- package/package.json +11 -11
package/lib/index.js
CHANGED
@@ -2672,7 +2672,7 @@ function _evaluate(path, state) {
|
|
2672
2672
|
if (object.isIdentifier() && property.isIdentifier() && isValidObjectCallee(object.node.name) && !isInvalidMethod(property.node.name)) {
|
2673
2673
|
context = global[object.node.name];
|
2674
2674
|
const key = property.node.name;
|
2675
|
-
if (Object.
|
2675
|
+
if (Object.hasOwn(context, key)) {
|
2676
2676
|
func = context[key];
|
2677
2677
|
}
|
2678
2678
|
}
|
@@ -4850,7 +4850,10 @@ class TraversalContext {
|
|
4850
4850
|
this.priorityQueue = [];
|
4851
4851
|
const visited = new WeakSet();
|
4852
4852
|
let stop = false;
|
4853
|
-
|
4853
|
+
let visitIndex = 0;
|
4854
|
+
for (; visitIndex < queue.length;) {
|
4855
|
+
const path = queue[visitIndex];
|
4856
|
+
visitIndex++;
|
4854
4857
|
path.resync();
|
4855
4858
|
if (path.contexts.length === 0 || path.contexts[path.contexts.length - 1] !== this) {
|
4856
4859
|
path.pushContext(this);
|
@@ -4872,8 +4875,8 @@ class TraversalContext {
|
|
4872
4875
|
if (stop) break;
|
4873
4876
|
}
|
4874
4877
|
}
|
4875
|
-
for (
|
4876
|
-
|
4878
|
+
for (let i = 0; i < visitIndex; i++) {
|
4879
|
+
queue[i].popContext();
|
4877
4880
|
}
|
4878
4881
|
this.queue = null;
|
4879
4882
|
return stop;
|