mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-22 17:42:57 +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
|
* @param arr Flattened array
|
||||||
*/
|
*/
|
||||||
export function flatten2dArray<T>(arr: T[][]): T[] {
|
export function flatten2dArray<T>(arr: T[][]): T[] {
|
||||||
// TODO: fix this
|
return ([] as T[]).concat(...arr);
|
||||||
return [].concat.apply([], arr as any);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user