diff --git a/src/models/reportCollection.js b/src/models/reportCollection.js index eb0d6e8..aa144a6 100755 --- a/src/models/reportCollection.js +++ b/src/models/reportCollection.js @@ -1,4 +1,5 @@ const Base = require('./base'); +let projlist= []; class reportCollection extends Base { constructor(config) { @@ -13,6 +14,10 @@ class reportCollection extends Base { push(report) { this.reports.push(report); + if (projlist.indexOf(report.project.name) === -1) { + projlist.push(report.project.name); + this.reports.push(report); + } } get length() { @@ -20,4 +25,4 @@ class reportCollection extends Base { } } -module.exports = reportCollection; \ No newline at end of file +module.exports = reportCollection;