diff --git a/tools/entity.ts b/tools/entity.ts index 3832782..12d2e86 100644 --- a/tools/entity.ts +++ b/tools/entity.ts @@ -1,8 +1,7 @@ /* eslint-disable import/prefer-default-export */ import type { BaseOption } from 'Elements/types'; +import { isEmpty } from 'radash/dist/typed'; export function normalizeOptions(options: any[] | null | undefined) { - if (options === null || options === undefined) return []; - - return options as BaseOption[]; + return (isEmpty(options) ? [] : options) as BaseOption[]; }