summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Userland/Libraries/LibJS/Parser.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/Userland/Libraries/LibJS/Parser.cpp b/Userland/Libraries/LibJS/Parser.cpp
index 44d6775786..846693cf93 100644
--- a/Userland/Libraries/LibJS/Parser.cpp
+++ b/Userland/Libraries/LibJS/Parser.cpp
@@ -1570,6 +1570,7 @@ Vector<FunctionNode::Parameter> Parser::parse_formal_parameters(int& function_le
RefPtr<Expression> default_value;
if (match(TokenType::Equals)) {
consume();
+ TemporaryChange change(m_state.in_function_context, true);
has_default_parameter = true;
function_length = parameters.size();
default_value = parse_expression(2);