diff --git a/lib/Runtime/ByteCode/ByteCodeEmitter.cpp b/lib/Runtime/ByteCode/ByteCodeEmitter.cpp index 482f4503193..f3e882b1507 100644 --- a/lib/Runtime/ByteCode/ByteCodeEmitter.cpp +++ b/lib/Runtime/ByteCode/ByteCodeEmitter.cpp @@ -3481,7 +3481,7 @@ void ByteCodeGenerator::StartEmitFunction(ParseNode *pnodeFnc) FuncInfo *funcInfo = pnodeFnc->sxFnc.funcInfo; - if (funcInfo->byteCodeFunction->IsFunctionParsed()) + if (funcInfo->byteCodeFunction->IsFunctionParsed() && funcInfo->GetParsedFunctionBody()->GetByteCode() == nullptr) { if (!(flags & (fscrEval | fscrImplicitThis | fscrImplicitParents))) {