summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gardiner <paul.gardiner@artifex.com>2018-08-20 15:59:06 +0100
committerPaul Gardiner <paul.gardiner@artifex.com>2018-08-20 16:00:26 +0100
commit781e6d58b23fc3b18549908fcc4b2163175d42a9 (patch)
tree24805035541b59ecc95a40cdbab3d26b76e56f84
parent3359bfb0bef6a13b3cfabb11a3de096ab2783e01 (diff)
downloadmupdf-781e6d58b23fc3b18549908fcc4b2163175d42a9.tar.xz
Use "PDF Alert" as the default javascript alert title.
Without this, for alerts where no title is specified, "undefined" was displayed.
-rw-r--r--source/pdf/pdf-js.c2
1 files changed, 1 insertions, 1 deletions
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)