File tree Expand file tree Collapse file tree 2 files changed +13
-6
lines changed
packages/app/src/app/overmind Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -25,11 +25,17 @@ const IS_PRODUCTION = process.env.NODE_ENV === 'production';
2525function createReaction ( overmind : any ) {
2626 return ( reactionCb : any , updateCb : any ) => {
2727 const tree = overmind . proxyStateTree . getTrackStateTree ( ) ;
28+ const updateReaction = ( ) => {
29+ tree . trackScope (
30+ ( ) => reactionCb ( tree . state ) ,
31+ ( ) => {
32+ updateCb ( reactionCb ( tree . state ) ) ;
33+ updateReaction ( ) ;
34+ }
35+ ) ;
36+ } ;
2837
29- tree . trackScope (
30- ( ) => reactionCb ( tree . state ) ,
31- ( ) => updateCb ( reactionCb ( tree . state ) )
32- ) ;
38+ updateReaction ( ) ;
3339
3440 return ( ) => {
3541 overmind . proxyStateTree . disposeTree ( tree ) ;
Original file line number Diff line number Diff line change @@ -151,8 +151,9 @@ export default {
151151 . receive ( 'ok' , resolve )
152152 . receive ( 'error' , reject ) ;
153153 } else {
154- // eslint-disable-next-line prefer-promise-reject-errors
155- reject ( 'Channel is not defined' ) ;
154+ // we might try to send messages even when not on live, just
155+ // ignore it
156+ resolve ( ) ;
156157 }
157158 } ) ;
158159 } ,
You can’t perform that action at this time.
0 commit comments