From 06823fbf1c2e763a5bf76c3990ca98fbbcd98691 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Tue, 14 May 2024 14:05:49 +0800 Subject: updated node_modules --- node_modules/@babel/traverse/lib/context.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'node_modules/@babel/traverse/lib/context.js') diff --git a/node_modules/@babel/traverse/lib/context.js b/node_modules/@babel/traverse/lib/context.js index 9aa34f9c..fc9a067a 100644 --- a/node_modules/@babel/traverse/lib/context.js +++ b/node_modules/@babel/traverse/lib/context.js @@ -72,7 +72,10 @@ class TraversalContext { this.priorityQueue = []; const visited = new WeakSet(); let stop = false; - for (const path of queue) { + let visitIndex = 0; + for (; visitIndex < queue.length;) { + const path = queue[visitIndex]; + visitIndex++; path.resync(); if (path.contexts.length === 0 || path.contexts[path.contexts.length - 1] !== this) { path.pushContext(this); @@ -94,8 +97,8 @@ class TraversalContext { if (stop) break; } } - for (const path of queue) { - path.popContext(); + for (let i = 0; i < visitIndex; i++) { + queue[i].popContext(); } this.queue = null; return stop; -- cgit v1.2.3