Skip to content

Commit

Permalink
Update utils-array.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
pubkey authored Jan 29, 2025
1 parent ba6d82b commit f1f1063
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/plugins/utils/utils-array.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export function randomOfArray<T>(arr: T[]): T {


export function toArray<T>(input: T | T[] | Readonly<T> | Readonly<T[]>): T[] {
return Array.isArray(input) ? (input as any[]).slice(0) : [input];
return Array.isArray(input) ? (input as any[]).slice(0) : ([input] as any);
}

/**
Expand Down

0 comments on commit f1f1063

Please sign in to comment.