mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-12 20:18:41 -09:00
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:
parent
fec4954dc1
commit
f939d88354
1 changed files with 9 additions and 5 deletions
|
|
@ -1,9 +1,13 @@
|
|||
import {INIT} from '../constants';
|
||||
import rpc from '../rpc';
|
||||
import { INIT } from '../constants';
|
||||
|
||||
export function init() {
|
||||
export function init () {
|
||||
return (dispatch) => {
|
||||
dispatch({
|
||||
type: INIT,
|
||||
effect: () => {
|
||||
rpc.emit('init');
|
||||
return {
|
||||
type: INIT
|
||||
}
|
||||
});
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue