Refresh after an order sync

This commit is contained in:
Dominic Ferrando
2026-07-31 13:22:38 -04:00
parent 6482c9ddab
commit b30cb3b6dc
@@ -26,14 +26,16 @@
async function sync(wOrderId: string) {
syncingWOrderId = wOrderId;
loadError = null;
let syncError: string | null = null;
try {
const res = await api.commerce.orders.sync({ wOrderId }).post();
if (res.error) throw res.error;
} catch (err) {
loadError = errorMessage(err);
} finally {
syncingWOrderId = null;
syncError = errorMessage(err);
}
await refresh();
if (syncError) loadError = syncError;
syncingWOrderId = null;
}
async function refresh() {