* @param jqXHR
*/
function handleAjaxError (jqXHR) {
- if (jqXHR.processId != null) {
+ if (jqXHR != null && jqXHR.processId != null) {
let message = null;
- if (jqXHR != null && jqXHR.responseJSON != null && jqXHR.responseJSON.errors != null) {
+ if (jqXHR.responseJSON != null && jqXHR.responseJSON.errors != null) {
message = _.pluck(jqXHR.responseJSON.errors, 'msg').join('. ');
}
failBackgroundProcess(jqXHR.processId, message);
const defaultFilter = function (item) {
const items = this.query[this.property];
- return items == null ||
- (items != null && items.split(',').indexOf(item.val) !== -1);
+ return items == null || items.split(',').indexOf(item.val) !== -1;
};
const defaultLabel = function (item) {