Skip to content

Commit

Permalink
fix(web): extract from the array
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTipo01 committed Nov 16, 2023
1 parent f7e203b commit 8a554fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web/src/lib/utilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export function AddObjectToArray(promise, objectToAdd) {
// Function to add an object to the array as the second element
export function AddObjectToArrayAsSecond(promise, objectToAdd) {
return promise.then((array) => {
return [array[0], objectToAdd, ...array.slice(1)];
return [array[0], ...objectToAdd, ...array.slice(1)];
});
}

Expand Down

0 comments on commit 8a554fc

Please sign in to comment.