Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor Request doesn't return send() returnvalue #1208

Open
mineichen opened this issue Aug 12, 2013 · 0 comments
Open

Refactor Request doesn't return send() returnvalue #1208

mineichen opened this issue Aug 12, 2013 · 0 comments

Comments

@mineichen
Copy link

mineichen commented Aug 12, 2013

I wanted to create my custom request, which should return a deferred object on call send(). Everything worked fine until i added mootools-more to my scripts. Here are the problematic lines:

1. initialize: function(options){
2.  this._send = this.send;
3.  this.send = function(options){
4.      var spinner = this.getSpinner();
5.      if (spinner) spinner.chain(this._send.pass(options, this)).show();
6.      else this._send(options);
7.      return this;
8.  };
9.  this.previous(options);
10. },

This code dublicate the logic, that .send() returns itself. In my case, it returns the Request instead of my Deferred-Object.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/778615-refactor-request-doesn-t-return-send-returnvalue?utm_campaign=plugin&utm_content=tracker%2F22069&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F22069&utm_medium=issues&utm_source=github).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant