summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2022-08-22 12:35:26 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2022-08-22 12:35:26 -0700
commitb5567684158ef32ea7e4e0ef32b1e25b98ca6f0a (patch)
tree2272fedcdefa6860f13f88e852a75eaa93ec5657
parent33be7fcd9c12e6826580ddd7181ddf7222894163 (diff)
trypandoc: fix error case when output is binary.
-rw-r--r--trypandoc/trypandoc.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/trypandoc/trypandoc.js b/trypandoc/trypandoc.js
index 063a5bca7..05f635c30 100644
--- a/trypandoc/trypandoc.js
+++ b/trypandoc/trypandoc.js
@@ -89,7 +89,7 @@ function convert() {
.then(response => response.text())
.then(restext => {
let binary = binaryFormats[to];
- if (binary) {
+ if (binary and response.ok) {
document.getElementById("results").innerHTML =
'<a download="trypandoc.' + binary.extension +
'" href="data:' + binary.mime + ';base64,' + restext +