Skip to content

Commit

Permalink
Do no throw when id is not a number
Browse files Browse the repository at this point in the history
  • Loading branch information
1602 committed May 19, 2016
1 parent 6e843c4 commit 1397457
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/sql.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ BaseSQL.prototype.escapeId = function(id) {
} else {
var idNumber = Number(id);
if (isNaN(idNumber)) {
throw new Error('id is not a number');
return '\'' + String(id).replace(/'/g, '') + '\'';
}
return idNumber;
}
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@
},
"dependencies": {
"inflection": "=1.2.7",
"when": "3.7.3",
"should": "=6.0.3"
"when": "3.7.3"
},
"jshintConfig": {
"proto": true
Expand Down

0 comments on commit 1397457

Please sign in to comment.