File tree Expand file tree Collapse file tree 1 file changed +0
-32
lines changed
packages/react-reconciler/src Expand file tree Collapse file tree 1 file changed +0
-32
lines changed Original file line number Diff line number Diff line change @@ -865,40 +865,8 @@ function useMutableSourceImpl<S>(
865
865
source: MutableSource,
866
866
config: MutableSourceHookConfig< S > ,
867
867
): S {
868
- if ( __DEV__ ) {
869
- if ( typeof config !== 'object' || config === null ) {
870
- console . error (
871
- 'Expected useMutableSource() second argument to be a config object. ' +
872
- 'Instead received: %s.' ,
873
- config === null ? 'null' : typeof config ,
874
- ) ;
875
- }
876
- }
877
-
878
868
const { getSnapshot , getVersion , subscribe } = config;
879
- if (__DEV__) {
880
- if (
881
- typeof getSnapshot !== 'function' ||
882
- typeof getVersion !== 'function' ||
883
- typeof subscribe !== 'function'
884
- ) {
885
- console . error (
886
- 'Invalid useMutableSource() config specified. ' +
887
- 'Config object should define getSnapshot, getVersion, and subscribe methods. ' +
888
- 'See https://fb.me/useMutableSource for more information.' ,
889
- ) ;
890
- }
891
- }
892
-
893
869
const version = getVersion();
894
- if ( __DEV__ ) {
895
- if ( version == null ) {
896
- console . error (
897
- 'useMutableSource() version should not be null or undefined.' ,
898
- ) ;
899
- }
900
- }
901
-
902
870
const pendingExpirationTime = getMutableSourcePendingExpirationTime(source);
903
871
904
872
let isSafeToReadFromSource = false;
You can’t perform that action at this time.
0 commit comments