branch: master
commit cde5d9a13dedb3c6bcc217893bd6d049f5db638b
Author: Dmitry Gutov <[email protected]>
Commit: Dmitry Gutov <[email protected]>
Undo some breakage
---
packages/js2-mode/js2-mode.el | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/packages/js2-mode/js2-mode.el b/packages/js2-mode/js2-mode.el
index 97f3269..926003d 100644
--- a/packages/js2-mode/js2-mode.el
+++ b/packages/js2-mode/js2-mode.el
@@ -10391,7 +10391,7 @@ EXPR is the first expression after the opening
left-bracket.
POS is the beginning of the LB token preceding EXPR.
We should have just parsed the 'for' keyword before calling this function."
(let ((current-scope js2-current-scope)
- loops filter result)
+ loops first filter result)
(unwind-protect
(progn
(while (js2-match-token js2-FOR)
@@ -10400,7 +10400,7 @@ We should have just parsed the 'for' keyword before
calling this function."
(push loop loops)
(js2-parse-comp-loop loop)))
;; First loop takes expr scope's parent.
- (setf (js2-scope-parent-scope (car (last loops)))
+ (setf (js2-scope-parent-scope (setq first (car (last loops))))
(js2-scope-parent-scope current-scope))
;; Set expr scope's parent to the last loop.
(setf (js2-scope-parent-scope current-scope) (car loops))