Don't insert a link of "undefined" if the process fails.

(imported from commit ba7d2c8bc9a280225862bd5edce302735d916e61)
This commit is contained in:
Luke Faraone
2013-04-05 13:19:42 -07:00
parent 28afd7126f
commit 59684c20f2

View File

@@ -519,6 +519,9 @@ $(function () {
$("#error-msg").text(msg);
},
uploadFinished: function (i, file, response, time) {
if (response.uri === undefined) {
return;
}
var textbox = $("#new_message_content");
textbox.val(textbox.val() + " " + response.uri);
$("#new_message_content").trigger("autosize");