Skip to content

Commit

Permalink
Fix: add empty string validation for raw orderBy
Browse files Browse the repository at this point in the history
  • Loading branch information
manelcecs committed Jan 2, 2024
1 parent 3a3030e commit e298382
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/db/util/raw-model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ export const defineRawModel =
query.orderBy(orderBy);
}

if (orderByRaw !== undefined) {
if (orderByRaw !== undefined && orderByRaw !== '') {
query.orderByRaw(orderByRaw);
}

Expand Down

0 comments on commit e298382

Please sign in to comment.