title: Cannot read property 'type' of undefined (ngrx)
body: <p>I am using ngrx. I got error</p>
  
  <blockquote>
    <p>Cannot read property 'type' of undefined</p>
  </blockquote>
  
  <p>This is part of my codes:</p>
  
  <pre><code>@Effect() foo$ = this.actions$
      .ofType(Actions.FOO)
      .withLatestFrom(this.store, (action, state) =&gt; ({ action, state }))
      .map(({ action, state }) =&gt; {
        if (state.foo.isCool) {
          return { type: Actions.BAR };
        }
      });
  </code></pre>