diff --git a/boa_engine/src/syntax/parser/expression/assignment/conditional.rs b/boa_engine/src/syntax/parser/expression/assignment/conditional.rs index eff99da0b0..064b79b283 100644 --- a/boa_engine/src/syntax/parser/expression/assignment/conditional.rs +++ b/boa_engine/src/syntax/parser/expression/assignment/conditional.rs @@ -80,13 +80,9 @@ where if let Some(tok) = cursor.peek(0, interner)? { if tok.kind() == &TokenKind::Punctuator(Punctuator::Question) { cursor.next(interner)?.expect("? character vanished"); // Consume the token. - let then_clause = AssignmentExpression::new( - None, - self.allow_in, - self.allow_yield, - self.allow_await, - ) - .parse(cursor, interner)?; + let then_clause = + AssignmentExpression::new(None, true, self.allow_yield, self.allow_await) + .parse(cursor, interner)?; cursor.expect(Punctuator::Colon, "conditional expression", interner)?; let else_clause = AssignmentExpression::new(