Renames variables for clarity

This commit is contained in:
Aaron Louie 2020-01-31 11:36:14 -05:00
parent 0f571989dd
commit c73d11b801

View File

@ -47,12 +47,12 @@ export class FileListComponent implements OnInit {
}); });
} }
makePrimary(fm: FileMeta) { makePrimary(fmPrimary: FileMeta) {
if (fm.type === FileType.BPMN) { if (fmPrimary.type === FileType.BPMN) {
let numUpdated = 0; let numUpdated = 0;
this.fileMetas.forEach(f => { this.fileMetas.forEach(fm => {
f.primary = (fm.id === f.id); fm.primary = (fmPrimary.id === fm.id);
this.api.updateFileMeta(this.workflowSpec.id, f).subscribe(() => { this.api.updateFileMeta(this.workflowSpec.id, fm).subscribe(() => {
numUpdated++; numUpdated++;
// Reload all fileMetas when all have been updated. // Reload all fileMetas when all have been updated.