refactor(backend): no-implicit-coercion

This commit is contained in:
Tibo De Peuter 2025-03-22 18:48:13 +01:00
parent 65c1a5e6b6
commit 10d3d0567e
Signed by: tdpeuter
GPG key ID: 38297DE43F75FFE2
5 changed files with 12 additions and 12 deletions

View file

@ -152,7 +152,7 @@ function convertTransition(
throw new Error(`Learning object ${transition.next.learningObjectHruid}/${transition.next.language}/${transition.next.version} not found!`);
} else {
return {
_id: '' + index, // Retained for backwards compatibility. The index uniquely identifies the transition within the learning path.
_id: String(index), // Retained for backwards compatibility. The index uniquely identifies the transition within the learning path.
default: false, // We don't work with default transitions but retain this for backwards compatibility.
next: {
_id: nextNode._id + index, // Construct a unique ID for the transition for backwards compatibility.