Commit 0189c315 authored by Romain DELEAU's avatar Romain DELEAU

fix equalizeLengths

parent f9e2549e
...@@ -128,9 +128,9 @@ export class Mission { ...@@ -128,9 +128,9 @@ export class Mission {
} else { } else {
role.chronologie = []; role.chronologie = [];
} }
// Pour les taches // Pour les taches
role.tasks.forEach(inlineTasks => { role.tasks.forEach((inlineTasks, index) => {
if (inlineTasks.some(element => element instanceof Task)) { if (inlineTasks.some(element => element instanceof Task)) {
let lastIndexTask = inlineTasks.length-1; let lastIndexTask = inlineTasks.length-1;
while (!(inlineTasks[lastIndexTask] instanceof Task)) { while (!(inlineTasks[lastIndexTask] instanceof Task)) {
...@@ -138,7 +138,7 @@ export class Mission { ...@@ -138,7 +138,7 @@ export class Mission {
} }
inlineTasks.splice(lastIndexTask+1, inlineTasks.length); inlineTasks.splice(lastIndexTask+1, inlineTasks.length);
} else { } else {
inlineTasks = []; role.tasks[index] = [];
} }
}); });
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment