From 781e6d58b23fc3b18549908fcc4b2163175d42a9 Mon Sep 17 00:00:00 2001 From: Paul Gardiner Date: Mon, 20 Aug 2018 15:59:06 +0100 Subject: Use "PDF Alert" as the default javascript alert title. Without this, for alerts where no title is specified, "undefined" was displayed. --- source/pdf/pdf-js.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/pdf/pdf-js.c b/source/pdf/pdf-js.c index 49b9c1e6..0185d0a9 100644 --- a/source/pdf/pdf-js.c +++ b/source/pdf/pdf-js.c @@ -90,7 +90,7 @@ static void app_alert(js_State *J) event.message = js_tostring(J, 1); event.icon_type = js_tointeger(J, 2); event.button_group_type = js_tointeger(J, 3); - event.title = js_tostring(J, 4); + event.title = js_isdefined(J, 4) ? js_tostring(J, 4) : "PDF Alert"; event.button_pressed = 0; /* WIP WIP WIP IS THIS CORRECT? */ fz_try(js->ctx) -- cgit v1.2.3