1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

[quickjs] namedItem return NULL for not found items

This commit is contained in:
Witold Filipczyk 2021-11-26 15:53:11 +01:00
parent 2e3d6fc334
commit fa712cd0e5

View File

@ -83,7 +83,7 @@ js_find_form_by_name(JSContext *ctx,
struct form *form; struct form *form;
if (!*string) if (!*string)
return JS_UNDEFINED; return JS_NULL;
foreach (form, doc_view->document->forms) { foreach (form, doc_view->document->forms) {
if (form->name && !c_strcasecmp(string, form->name)) { if (form->name && !c_strcasecmp(string, form->name)) {
@ -91,7 +91,7 @@ js_find_form_by_name(JSContext *ctx,
} }
} }
return JS_UNDEFINED; return JS_NULL;
} }
static void static void