Enabled strict mode, and fixed issues raised.

This commit is contained in:
Dan Wilson
2013-05-13 16:53:55 +01:00
parent 773e03c9c7
commit b72dd0fb62
17 changed files with 32 additions and 18 deletions

View File

@@ -3,10 +3,11 @@ this.recline.Backend = this.recline.Backend || {};
this.recline.Backend.ElasticSearch = this.recline.Backend.ElasticSearch || {};
(function($, my) {
"use strict";
my.__type__ = 'elasticsearch';
// use either jQuery or Underscore Deferred depending on what is available
var Deferred = _.isUndefined(this.jQuery) ? _.Deferred : jQuery.Deferred;
var Deferred = _.isUndefined(window.jQuery) ? _.Deferred : jQuery.Deferred;
// ## ElasticSearch Wrapper
//
@@ -200,8 +201,8 @@ this.recline.Backend.ElasticSearch = this.recline.Backend.ElasticSearch || {};
fields: fieldData
});
})
.fail(function(arguments) {
dfd.reject(arguments);
.fail(function(args) {
dfd.reject(args);
});
return dfd.promise();
};