[-] Reomve duplicate type names

This commit is contained in:
Hykilpikonna
2019-11-05 17:37:29 -05:00
parent d362598d83
commit cf794588df
+8 -1
View File
@@ -59,7 +59,14 @@
*/ */
getAssignmentTypes(): string[] getAssignmentTypes(): string[]
{ {
return [...this.course.assignments.map(a => a.type)]; // Get all types
let types = this.course.assignments.map(a => a.type);
// Remove duplicates
types = types.filter((type, i, a) => a.indexOf(type) == i);
// Return it
return types;
} }
} }
</script> </script>