修复ck更新状态同步

This commit is contained in:
whyour 2021-05-07 17:05:11 +08:00
parent 806eeae7d2
commit 99d8a8dd23
2 changed files with 3 additions and 3 deletions

View File

@ -165,11 +165,11 @@ export default class CookieService {
{ _id: payload._id }, { _id: payload._id },
payload, payload,
{ returnUpdatedDocs: true }, { returnUpdatedDocs: true },
(err, docs) => { (err, num, doc) => {
if (err) { if (err) {
this.logger.error(err); this.logger.error(err);
} else { } else {
resolve(docs as Cookie); resolve(doc as Cookie);
} }
}, },
); );

View File

@ -46,7 +46,7 @@ const CookieModal = ({
}); });
} }
setLoading(false); setLoading(false);
handleCancel(data); handleCancel(cookie ? [data] : data);
}; };
useEffect(() => { useEffect(() => {