diff --git a/models/common.ts b/models/common.ts index ecedc18..f9ac858 100644 --- a/models/common.ts +++ b/models/common.ts @@ -48,7 +48,7 @@ export default class Model extends TypeORM.BaseEntity { if (result) { cacheSet(this.name, id, result); } - return result.clone(); + return result && result.clone(); } else { return await doQuery(); }