From d799fbc0c66fc3cd27d2537b260868783130e1b5 Mon Sep 17 00:00:00 2001 From: Radek Krahl Date: Sun, 12 Apr 2020 21:57:39 +0200 Subject: [PATCH] Update boa/src/exec/mod.rs Co-Authored-By: HalidOdat --- boa/src/exec/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/boa/src/exec/mod.rs b/boa/src/exec/mod.rs index befa967445..aaf4b16496 100644 --- a/boa/src/exec/mod.rs +++ b/boa/src/exec/mod.rs @@ -165,10 +165,10 @@ impl Executor for Interpreter { } Ok(result) } - Node::DoWhileLoop(ref expr, ref cond) => { - let mut result = self.run(expr)?; + Node::DoWhileLoop(ref body, ref cond) => { + let mut result = self.run(body)?; while self.run(cond)?.borrow().is_true() { - result = self.run(expr)?; + result = self.run(body)?; } Ok(result) }