Browse Source

Fix TypeError when query cached model not found

pull/6/head
Menci 6 years ago
parent
commit
50296e76ee
  1. 2
      models/common.ts

2
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();
}

Loading…
Cancel
Save