Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
NarHakobyan committed Sep 8, 2024
2 parents de75169 + 69be886 commit f1a8202
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/decorators/transform.decorators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ export function ToInt(): PropertyDecorator {
*/
export function ToArray(): PropertyDecorator {
return Transform(
(params) => {
(params): unknown[] => {
const value = params.value;

if (isNil(value)) {
return [];
if (!value) {
return value;
}

return castArray(value);
Expand Down

0 comments on commit f1a8202

Please sign in to comment.