Skip to content

Commit

Permalink
Merge pull request #14 from OKNoah/sort-bug
Browse files Browse the repository at this point in the history
sort-bug
  • Loading branch information
OKNoah authored Dec 16, 2017
2 parents e9e8b8a + 34a63f3 commit 9947cd6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions models/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,13 +219,13 @@ export default class Model {
query += getWhere()
}

if (limit || skip) {
query += ` limit ${skip ? skip + ', ' : ''}${limit || 100}`
}

if (sort) {
query += ` sort ${item}.${sort}`
}

if (limit || skip) {
query += ` limit ${skip ? skip + ', ' : ''}${limit || 100}`
}

if (attributes || include) {
query += getAttributes()
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "final-orm",
"version": "1.0.0-alpha.5",
"version": "1.0.0-alpha.6",
"repository": {
"type": "git",
"url": "https://github.com/OKNoah/final-orm"
Expand Down

0 comments on commit 9947cd6

Please sign in to comment.