Last active
March 23, 2019 18:09
-
-
Save Sinewyk/7db1089db3a234afdad2b0bd2ec3ece2 to your computer and use it in GitHub Desktop.
diff @cycle/state
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/state/src/withState.ts b/state/src/withState.ts | |
index 030084c1..aa91388f 100644 | |
--- a/state/src/withState.ts | |
+++ b/state/src/withState.ts | |
@@ -39,11 +39,13 @@ export function withState< | |
xs.fromObservable<Reducer<T>>(sinks[name]), | |
xs.never() | |
); | |
- stream$.subscribe({ | |
- next: i => schedule(() => reducerMimic$._n(i)), | |
- error: err => schedule(() => reducerMimic$._e(err)), | |
- complete: () => schedule(() => reducerMimic$._c()), | |
- }); | |
+ schedule(() => { | |
+ stream$.subscribe({ | |
+ next: i => reducerMimic$._n(i), | |
+ error: err => reducerMimic$._e(err), | |
+ complete: () => reducerMimic$._c(), | |
+ }); | |
+ }) | |
} | |
return sinks as any; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment