fix: async/await в addEquipment
This commit is contained in:
parent
bd9aedbdfe
commit
0602415ba0
@ -367,7 +367,7 @@ function updateCounts() {
|
||||
}
|
||||
}
|
||||
|
||||
function addEquipment(event) {
|
||||
async function addEquipment(event) {
|
||||
event.preventDefault();
|
||||
const form = event.target;
|
||||
const formData = new FormData(form);
|
||||
@ -392,7 +392,7 @@ function addEquipment(event) {
|
||||
nextCheck: nextCheck,
|
||||
note: formData.get('note') || ''
|
||||
};
|
||||
saveEquipment();
|
||||
await saveEquipment();
|
||||
updateAll();
|
||||
resetForm();
|
||||
switchTab('all');
|
||||
@ -415,7 +415,7 @@ function addEquipment(event) {
|
||||
};
|
||||
|
||||
equipment.push(newItem);
|
||||
saveEquipment();
|
||||
await saveEquipment();
|
||||
resetForm();
|
||||
updateAll();
|
||||
switchTab('all');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user