[njs] Fixed async function declaration in CLI.
Vadim Zhestikov
v.zhestikov at f5.com
Fri Jul 15 23:06:55 UTC 2022
details: https://hg.nginx.org/njs/rev/56a890599de2
branches:
changeset: 1910:56a890599de2
user: Vadim Zhestikov <v.zhestikov at f5.com>
date: Fri Jul 15 15:44:16 2022 -0700
description:
Fixed async function declaration in CLI.
This closes #559 issue on Github.
diffstat:
src/njs_generator.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diffs (13 lines):
diff -r 6a71c19cec11 -r 56a890599de2 src/njs_generator.c
--- a/src/njs_generator.c Thu Jul 14 20:16:37 2022 -0700
+++ b/src/njs_generator.c Fri Jul 15 15:44:16 2022 -0700
@@ -2615,7 +2615,8 @@ njs_generate_stop_statement_end(njs_vm_t
if (node != NULL) {
if ((node->index != NJS_INDEX_NONE
- && node->token_type != NJS_TOKEN_FUNCTION_DECLARATION)
+ && node->token_type != NJS_TOKEN_FUNCTION_DECLARATION
+ && node->token_type != NJS_TOKEN_ASYNC_FUNCTION_DECLARATION)
|| node->token_type == NJS_TOKEN_THIS)
{
index = node->index;
More information about the nginx-devel
mailing list