From f4f2479b8aacde70ba34f3ad9387d4d7627926d2 Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Sun, 17 Jul 2016 11:34:39 -0400 Subject: [PATCH] fix --- contrib/js/livechan.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/js/livechan.js b/contrib/js/livechan.js index 26bc961..cc2d551 100644 --- a/contrib/js/livechan.js +++ b/contrib/js/livechan.js @@ -1040,7 +1040,8 @@ Chat.prototype.sendInput = function(event) { data.set("subject", subject); data.set("message", message); data.set("reference", convo); - data.set("attachment_0", inputElem.file.files[0]); + if (inputElem.file.files[0]) + data.set("attachment_0", inputElem.file.files[0]); ajax.send(data); /** self.readImage(inputElem.file, function(fdata, fname, ftype) {