mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
♻️ Remove error handling from persist actions
This commit is contained in:
parent
540be69cc9
commit
9c1e6f3b27
7 changed files with 27 additions and 60 deletions
|
@ -75,16 +75,10 @@ export const setIsReady = ( state ) => setTransient( 'isReady', state );
|
|||
*/
|
||||
export function persist() {
|
||||
return async ( { select } ) => {
|
||||
const data = select.persistentData();
|
||||
|
||||
try {
|
||||
await apiFetch( {
|
||||
path: REST_PERSIST_PATH,
|
||||
method: 'POST',
|
||||
data,
|
||||
} );
|
||||
} catch ( e ) {
|
||||
console.error( 'Error saving progress.', e );
|
||||
}
|
||||
await apiFetch( {
|
||||
path: REST_PERSIST_PATH,
|
||||
method: 'POST',
|
||||
data: select.persistentData(),
|
||||
} );
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue