Fix the rest of the enyo.Ajax instances to use new bind style
[blerg.git] / www / jssrc / blerg / API.js
index 986ac09..cd85745 100644 (file)
@@ -128,7 +128,7 @@ enyo.kind({
         var req = new enyo.Ajax({
             url: url
         });
-        req.response(function(inSender, inResponse) {
+        req.response(this, function(inSender, inResponse) {
             this.bubble('onItemsLoaded', {
                 type: 'user',
                 username: username,
@@ -136,13 +136,13 @@ enyo.kind({
                 to: to,
                 entries: inResponse
             });
-        }.bind(this));
-        req.error(function(inSender, inResponse) {
+        });
+        req.error(this, function(inSender, inResponse) {
             if (inResponse == 404)
                 this.bubble('onUserNotFound');
             else
                 this.bubble('onAPIError', {response: inResponse});
-        }.bind(this));
+        });
         req.go();
     },
     loadTagRecords: function(type, tag) {