I have a js file with some functionalities that works 100% on my local machine but once it has been deployed to the server, some functionality doesn't work. When I publish it creates es5 and es5.min extensions. When I trace why I cannot get the desired results I can see it is failing on es5.min which I don't know why it is like that. I have compared both files and their all look the same.
I am not too sure what those min files do and if needed or should be deleted as it is breaking while the original file is not breaking.
What might be the problem, is it a catch on
Uncaught TypeError: jqXHR.responseJSON is undefined error https://serverurl/scripts/customer.es5.min.js?6.0:460
Code : Line 460
build_chart_user_activity: function () {
var self = reporting;
//select all assigned
self.form.assigned_users.find("option").prop("selected", true);
var param = {
start_date: self.form.start_date.val(),
end_date: self.form.end_date.val(),
usernames: self.form.assigned_users.val(),
all_users: self.form.all_users_chk.prop("checked"),
r: self.form.customer.val()
};
$.ajax({
type: "post",
contentType: "application/json",
url: "_content/customer.aspx/GetCustomer",
data: JSON.stringify(param),
dataType: 'json',
success: function (result) {
var s = JSON.parse(result.d);
if (s.length > 0) {
self.charts.chart_data = s;
self.methods.build_data_table();
self.charts.chart_export_btn.prop("disabled", false);
self.charts.export_btn_toExcel.prop("disabled", false);
}
else {
self.methods.clear_data_table();
}
},
error: function (jqXHR, textStatus, errorThrown) {
common.display_error(jqXHR.responseJSON.Message); line 460: This is where it is failing.
}
});
}