Commit 9a18b916 authored by Romain DELEAU's avatar Romain DELEAU

fix: read characters of tasks on upload file

parent e8cc3d35
......@@ -192,7 +192,7 @@ export class AppComponent {
task.characters.forEach((character, index) => {
let i: number | undefined = scenario.characters.findIndex(element => element.name == character.name && element.description == character.description && element.color == character.color);
if (typeof i !== 'undefined' && i !== -1) {
task.characters[i] = scenario.characters[index];
task.characters[index] = scenario.characters[i];
}
});
task.supplementaryRole = Object.assign(new SupplementaryRole, task.supplementaryRole);
......
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