return a Redux thunk for the INIT action (#675)

Before, Redux was throwing an error saying that a plain
object was not being returned from the `init()` function
which was breaking hyperterm.
This commit is contained in:
Nathan Rajlich 2016-10-04 14:41:50 -07:00 committed by Guillermo Rauch
parent fec4954dc1
commit f939d88354

View file

@ -1,9 +1,13 @@
import {INIT} from '../constants';
import rpc from '../rpc'; import rpc from '../rpc';
import { INIT } from '../constants';
export function init() { export function init () {
rpc.emit('init'); return (dispatch) => {
return { dispatch({
type: INIT type: INIT,
effect: () => {
rpc.emit('init');
}
});
}; };
} }