1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-09-19 01:36:33 -04:00

[spidermonkey] Check for undefined in xhr.open

This commit is contained in:
Witold Filipczyk 2024-06-22 14:40:59 +02:00
parent 86234795fb
commit 66dcf19139

View File

@ -642,10 +642,10 @@ xhr_open(JSContext *ctx, unsigned int argc, JS::Value *rval)
char *username = NULL;
char *password = NULL;
if (argc > 3) {
if (argc > 3 && !args[3].isUndefined()) {
username = jsval_to_string(ctx, args[3]);
}
if (argc > 4) {
if (argc > 4 && !args[4].isUndefined()) {
password = jsval_to_string(ctx, args[4]);
}
if (username || password) {