Skip to content

Commit 0885761

Browse files
RodrigoSMarquesphillwiggins
authored andcommitted
Fix OrderBy multiple columns (#243)
* fix some issues * Update README.md * Fix OrderBy multiple columns * Fix OrderBy multiple columns Fix OrderBy multiple columns
1 parent 6dc5231 commit 0885761

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/src/network/parse_query.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class QueryBuilder<T extends ParseObject> {
3232
/// [String] order will be the column of the table that the results are
3333
/// ordered by
3434
void orderByAscending(String order) {
35-
if (limiters.isEmpty) {
35+
if (!limiters.containsKey('order')) {
3636
limiters['order'] = order;
3737
} else {
3838
limiters['order'] = limiters['order'] + ',' + order;
@@ -44,7 +44,7 @@ class QueryBuilder<T extends ParseObject> {
4444
/// [String] order will be the column of the table that the results are
4545
/// ordered by
4646
void orderByDescending(String order) {
47-
if (limiters.isEmpty) {
47+
if (!limiters.containsKey('order')) {
4848
limiters['order'] = '-$order';
4949
} else {
5050
limiters['order'] = limiters['order'] + ',' + '-$order';

0 commit comments

Comments
 (0)