diff --git a/src/models/reportCollection.js b/src/models/reportCollection.js index eb0d6e8..7ca8b40 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) { @@ -12,12 +13,14 @@ 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() { return this.reports.length; } } -module.exports = reportCollection; \ No newline at end of file +module.exports = reportCollection;