f33396e425
Following https://github.com/twentyhq/twenty/pull/14762 In this PR - moved logic around any field filter formatting to twenty-shared - added any field filter to the filters applied to groupBy when viewId is defined - added integration test
16 lines
335 B
TypeScript
16 lines
335 B
TypeScript
import { isNumber } from '@sniptt/guards';
|
|
|
|
export const isNonEmptyArray = <T>(
|
|
probableArray: T[] | readonly T[] | undefined | null,
|
|
): probableArray is NonNullable<T[]> => {
|
|
if (
|
|
Array.isArray(probableArray) &&
|
|
isNumber(probableArray.length) &&
|
|
probableArray.length > 0
|
|
) {
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
};
|