mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-09 19:22:51 +00:00
refactor: fix type error with flattening arrays
This commit is contained in:
@@ -51,8 +51,7 @@ export async function getProjects(api: Api, groups: number[]): Promise<Project[]
|
||||
* @param arr Flattened array
|
||||
*/
|
||||
export function flatten2dArray<T>(arr: T[][]): T[] {
|
||||
// TODO: fix this
|
||||
return [].concat.apply([], arr as any);
|
||||
return ([] as T[]).concat(...arr);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user