diff --git a/core/misc/ajax.js b/core/misc/ajax.js index fefe9f3..9ad4f4e 100644 --- a/core/misc/ajax.js +++ b/core/misc/ajax.js @@ -1305,9 +1305,14 @@ * @param {number} [status] * The XMLHttpRequest status. */ - update_build_id: function (ajax, response, status) { - $('input[name="form_build_id"][value="' + response.old + '"]').val(response.new); - }, + update_build_id: function (ajax, response, status) { + var old_build_id = $('input[name="form_build_id"][value="' + response.old + '"]'); + if (old_build_id.length == 0) { + $('input[name="form_build_id"]').val(response.new); + } else { + $('input[name="form_build_id"][value="' + response.old + '"]').val(response.new); + } + },