From: Dmitry Volyntsev Date: Thu, 26 Apr 2018 17:21:46 +0000 (+0300) Subject: Fixed return value type of clearTimeout(). X-Git-Url: http://git.kaiwu.me/sitemap.xml?a=commitdiff_plain;h=d8d7f2b1503521e1177c6c78293ee6a27ffe3e8a;p=njs.git Fixed return value type of clearTimeout(). Previously, the function may return the "undefined" string. --- diff --git a/njs/njs_time.c b/njs/njs_time.c index f13a4062..d97c80ba 100644 --- a/njs/njs_time.c +++ b/njs/njs_time.c @@ -103,7 +103,7 @@ njs_clear_timeout(njs_vm_t *vm, njs_value_t *args, nxt_uint_t nargs, nxt_lvlhsh_query_t lhq; if (nxt_fast_path(nargs < 2) || !njs_is_number(&args[1])) { - vm->retval = njs_string_void; + vm->retval = njs_value_void; return NJS_OK; } @@ -120,7 +120,7 @@ njs_clear_timeout(njs_vm_t *vm, njs_value_t *args, nxt_uint_t nargs, njs_del_event(vm, event, NJS_EVENT_RELEASE | NJS_EVENT_DELETE); } - vm->retval = njs_string_void; + vm->retval = njs_value_void; return NJS_OK; }