From 89070b4087684f5886d929666eba96bd5ae39419 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Mon, 5 Jan 2015 13:45:11 -0800 Subject: [PATCH] INFRA-132 - js/crm.backbone.js - Cleanup empty checks to satisfy jshint --- js/crm.backbone.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/js/crm.backbone.js b/js/crm.backbone.js index ad27bec160..e384466213 100644 --- a/js/crm.backbone.js +++ b/js/crm.backbone.js @@ -123,7 +123,7 @@ }, toCrmCriteria: function() { var result = (this.get('id')) ? {id: this.get('id')} : {}; - if (this.crmReturn != null) { + if (!_.isEmpty(this.crmReturn)) { result.return = this.crmReturn; } return result; @@ -323,9 +323,9 @@ }, toCrmCriteria: function() { var result = (this.crmCriteria) ? _.extend({}, this.crmCriteria) : {}; - if (this.crmReturn != null) { + if (!_.isEmpty(this.crmReturn)) { result.return = this.crmReturn; - } else if (this.model && this.model.prototype.crmReturn != null) { + } else if (this.model && !_.isEmpty(this.model.prototype.crmReturn)) { result.return = this.model.prototype.crmReturn; } return result; @@ -423,7 +423,7 @@ }); collection.fetch({ success: function(collection) { - if (collection.length == 0) { + if (collection.length === 0) { var attrs = _.extend({}, collection.crmCriteria, options.defaults || {}); var model = collection._prepareModel(attrs, options); options.success(model); -- 2.25.1