diff --git a/src/automats/brandAutomat.js b/src/automats/brandAutomat.js index b2d0111..090b5a5 100644 --- a/src/automats/brandAutomat.js +++ b/src/automats/brandAutomat.js @@ -53,7 +53,7 @@ async function fetchAllBrands() { let offset = 0; let total = Infinity; const collected = []; - for (;;) { + for (; ;) { const res = await brandApi.list({ offset, limit: FETCH_PAGE_SIZE }); if (offset === 0) total = Number(res.total ?? res.brands?.length ?? 0); const page = Array.isArray(res.brands) ? res.brands : []; @@ -155,7 +155,7 @@ const actions = { */ async addImage(id, file) { const res = await brandApi.addImage(id, file); - await brandAutomat.actions.load(); + await brandAutomat.actions.reload(); return res.brand; }, @@ -165,7 +165,7 @@ const actions = { */ async deleteImage(id) { const res = await brandApi.deleteImage(id); - await brandAutomat.actions.load(); + await brandAutomat.actions.reload(); return res.brand; }, @@ -202,12 +202,12 @@ sseAutomat.actions.on('brand', (event) => { if (payload && typeof payload.sender === 'string' && payload.sender) { try { if (payload.sender === getSseClientId()) return; - } catch {} + } catch { } } } catch { // Unparseable payload: fall through to reload. } - void brandAutomat.actions.reload().catch(() => {}); + void brandAutomat.actions.reload().catch(() => { }); }); export default brandAutomat;