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:
parent
2e3d6fc334
commit
fa712cd0e5
@ -83,7 +83,7 @@ js_find_form_by_name(JSContext *ctx,
|
||||
struct form *form;
|
||||
|
||||
if (!*string)
|
||||
return JS_UNDEFINED;
|
||||
return JS_NULL;
|
||||
|
||||
foreach (form, doc_view->document->forms) {
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user