@@ -59,18 +59,12 @@ export const persistMiddleware = (save, load) => (next) => (action) => __awaiter
5959 // Only run this code for our defined load actions
6060 if ( ! _isNil ( targetActionAndKey ) ) {
6161 const { key : asyncStorageKey } = targetActionAndKey ;
62- console . log ( {
63- targetActionAndKey,
64- currentValueActionAndKeys,
65- asyncStorageKey
66- } ) ;
6762 // If target is nil, then no need to attempt to load from async storage
6863 if ( ! _isNil ( asyncStorageKey ) ) {
6964 // Invoke our load function on the target key
7065 let payload = yield loadMethod ( asyncStorageKey ) ;
71- console . log ( { payload } ) ;
7266 // Merge the payload received from our load function
73- // action.payload = { ... payload, ... action.payload } ;
67+ action . payload = Object . assign ( Object . assign ( { } , payload ) , action . payload ) ;
7468 // Update our current value target to isLoaded = true
7569 currentValue [ asyncStorageKey ] = Object . assign ( Object . assign ( { } , _get ( currentValue , asyncStorageKey , { } ) ) , { isLoaded : true } ) ;
7670 }
@@ -146,7 +140,6 @@ export function createPersistMachine(structure, store, debug) {
146140 } ) ;
147141 // Merges our newState object into our currentValues by key
148142 currentValue [ asyncStorageKey ] = Object . assign ( Object . assign ( { } , _get ( currentValue , asyncStorageKey , { } ) ) , { key : asyncStorageKey , state : newState } ) ;
149- console . log ( { currentValue } , "100" ) ;
150143 if ( ! _isEqual ( previousValue , newState ) ) {
151144 /*
152145 * Each reducers value will have an `isLoaded` property, this
@@ -183,7 +176,6 @@ export function createPersistMachine(structure, store, debug) {
183176 * @param store Redux store
184177 */
185178function loadAutomaticReducers ( store ) {
186- console . log ( { currentValue } , "loadAutomatic" ) ;
187179 Object . entries ( currentValue )
188180 . forEach ( ( item ) => {
189181 if ( item [ 1 ] . automatic ) {
0 commit comments