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

Cannot execute the search #29

Closed
cybersiddhu opened this issue May 18, 2015 · 2 comments
Closed

Cannot execute the search #29

cybersiddhu opened this issue May 18, 2015 · 2 comments

Comments

@cybersiddhu
Copy link

As soon as i hit the Go! button i see the following error

Uncaught TypeError: Cannot read property 'dispatch' of undefined  AppDispatcher.js:10

Here is the relevant line

class AppDispatcher extends Dispatcher {
  /**
   * Dispatches three actions for an async operation represented by promise.
   */
  dispatchAsync(promise, types, action = {}) {
    const { request, success, failure } = types;

    this.dispatch(request, action);   === > Error here
    promise.then(
      response => this.dispatch(success, { ...action, response }),
      error => this.dispatch(failure, { ...action, error })
    );
  }
@gaearon
Copy link
Owner

gaearon commented May 19, 2015

Hey, thanks for noticing. I don't know how it worked before.
I fixed this by completely getting rid of inheritance there and just delegating to a Flux dispatcher instance.

@cybersiddhu
Copy link
Author

Alright thanks a ton

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

2 participants