zs 1 tahun lalu
induk
melakukan
c3708d9357
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      src/service/application.service.ts

+ 1 - 1
src/service/application.service.ts

@@ -107,7 +107,7 @@ export class ApplicationService extends BaseService<modelType> {
     const res = [];
     const res = [];
     for (const val of team) {
     for (const val of team) {
       const data = await this.TeamModel.findById(val);
       const data = await this.TeamModel.findById(val);
-      res.push(data);
+      if (data) res.push(data);
     }
     }
     const list = this.pagination(skip, limit, res);
     const list = this.pagination(skip, limit, res);
     const total = list.length;
     const total = list.length;