commit:15f8a303bfc30ec592e2045fc994437132645456
author:Chip Black
committer:Chip Black
date:Sun Nov 17 15:27:55 2013 -0800
parents:0085ebfed447d3e7a828eb691a78c5ccc2c21a8c
Fix the rest of the enyo.Ajax instances to use new bind style
diff --git a/www/jssrc/blerg/API.js b/www/jssrc/blerg/API.js
line changes: +4/-4
index 986ac09..cd85745
--- a/www/jssrc/blerg/API.js
+++ b/www/jssrc/blerg/API.js
@@ -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) {