ngrx / store-devtools

Developer Tools for @ngrx/store
MIT License
326 stars 38 forks source link

Error: Actions may not have an undefined "type" property. When using @ngrx/effects. #59

Closed damnko closed 7 years ago

damnko commented 7 years ago

Hi, I am getting the following error when I dispatch an action that triggers an effect via @ngrx/effects

Actions may not have an undefined "type" property. Have you misspelled a constant?

The issue can be reproduced by cloning this repo. It happens only when the Chrome extension is installed.

Browser: Google Chrome v57.0.2987.133 (64-bit) OS: Linux Mint 17.2 Rafaela (64-bit) NPM: v4.1.2 NodeJs: v7.4.0

MikeRyanDev commented 7 years ago

This effect is causing you dispatch items that are not actions: https://github.com/damnko/angular2-ngrx-store/blob/master/src/app/effects/index.ts#L10

Update your effect decorator to prevent dispatching if the effect's intention is not to cause new actions to enter the stream:

@Effect({ dispatch: false })
damnko commented 7 years ago

Wow thanks a lot for your help. That was fast and super helpful.