Skip to content

Commit 8cc6e50

Browse files
committed
增加if
1 parent d46c8ed commit 8cc6e50

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/services/MysqlCache.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export class MysqlCache<Scheme> extends MysqlNative<Scheme> {
4949
async upsertById(id: string, data: CoaMysql.SafePartial<Scheme>, trx?: CoaMysql.Transaction) {
5050
const dataList = await this.getCacheChangedDataList([id], data, trx)
5151
const result = await super.upsertById(id, data, trx);
52-
if (result) { (trx && (trx as any).trxUpdateCacheTaskList) ? await (trx as any).trxUpdateCacheTaskList(this, [id], dataList) : await this.deleteCache([id], dataList) }
52+
(trx && (trx as any).trxUpdateCacheTaskList) ? await (trx as any).trxUpdateCacheTaskList(this, [id], dataList) : await this.deleteCache([id], dataList)
5353
return result
5454
}
5555

0 commit comments

Comments
 (0)