summaryrefslogtreecommitdiffhomepage
path: root/html/whiteboard.js
diff options
context:
space:
mode:
Diffstat (limited to 'html/whiteboard.js')
-rw-r--r--html/whiteboard.js12
1 files changed, 8 insertions, 4 deletions
diff --git a/html/whiteboard.js b/html/whiteboard.js
index 50b0058..07e3804 100644
--- a/html/whiteboard.js
+++ b/html/whiteboard.js
@@ -96,10 +96,14 @@ function on_version(version)
function on_pdf(pdf)
{
- var a = document.getElementById("download-a");
- a.href = "data:application/pdf;base64," + pdf;
- a.download = get_id() + ".pdf"
- a.click();
+ if (pdf == "") {
+ alert("Note: Empty PDF, not saving.");
+ } else {
+ var a = document.getElementById("download-a");
+ a.href = "data:application/pdf;base64," + pdf;
+ a.download = get_id() + ".pdf"
+ a.click();
+ }
}
function on_modify_ack(rev)