diff --git a/frontend/src/helpers/calculateItemPosition.ts b/frontend/src/helpers/calculateItemPosition.ts index 9cea6e51f..6fa2c4e99 100644 --- a/frontend/src/helpers/calculateItemPosition.ts +++ b/frontend/src/helpers/calculateItemPosition.ts @@ -1,4 +1,7 @@ -export const calculateItemPosition = (positionBefore: number | null, positionAfter: number | null): number => { +export const calculateItemPosition = ( + positionBefore: number | null = null, + positionAfter: number | null = null, +): number => { if (positionBefore === null) { if (positionAfter === null) { return 0 @@ -13,6 +16,6 @@ export const calculateItemPosition = (positionBefore: number | null, positionAft return positionBefore + Math.pow(2, 16) } - // If we have both a task before and after it, we acually calculate the position + // If we have both a task before and after it, we actually calculate the position return positionBefore + (positionAfter - positionBefore) / 2 } \ No newline at end of file diff --git a/frontend/src/views/project/settings/ProjectSettingsViews.vue b/frontend/src/views/project/settings/ProjectSettingsViews.vue index 39a7ba626..71ef6da1e 100644 --- a/frontend/src/views/project/settings/ProjectSettingsViews.vue +++ b/frontend/src/views/project/settings/ProjectSettingsViews.vue @@ -1,6 +1,6 @@