From 06cc18526a1f63b8bb16809e23f2eb17ade7a85e Mon Sep 17 00:00:00 2001 From: Loz Calver Date: Wed, 9 Sep 2015 09:24:56 +0100 Subject: [PATCH] FIX: UploadField error when attempting to attach non-existent file IDs --- javascript/UploadField.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/javascript/UploadField.js b/javascript/UploadField.js index 698f36249..ab2c7a7dd 100644 --- a/javascript/UploadField.js +++ b/javascript/UploadField.js @@ -316,6 +316,8 @@ indicator.remove(); }, success: function(data, status, xhr) { + if (!data || $.isEmptyObject(data)) return; + self.fileupload('attach', { files: data, options: self.fileupload('option'),