Browse Source

Fixed issue with issues that have empty reasons still showing

theflametrooper 8 years ago
parent
commit
cba7440bd0
1 changed files with 5 additions and 1 deletions
  1. 5 1
      backend/logic/actions/reports.js

+ 5 - 1
backend/logic/actions/reports.js

@@ -113,10 +113,14 @@ module.exports = {
 			},
 			
 			(next) => {
+				let issues = [];
+
 				for (let r = 0; r < data.issues.length; r++) {
-					if (data.issues[r].reasons.length === 0) data.issues.splice(r, 1);
+					if (!data.issues[r].reasons.length <= 0) issues.push(data.issues[r]);
 				}
 
+				data.issues = issues;
+
 				next();
 			},