Skip to content
This repository has been archived by the owner on Feb 28, 2023. It is now read-only.

Commit

Permalink
issue orm fail when kill sails.js
Browse files Browse the repository at this point in the history
"if (!connections[connection].persistent) {
                                       ^
 TypeError: Cannot read property 'persistent' of undefined
"
  • Loading branch information
some-say committed Jun 1, 2015
1 parent 6ae5319 commit d120f0b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8
indent_style = space
indent_size = 2
2 changes: 1 addition & 1 deletion lib/adapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ module.exports = (function () {
var request = new mssql.Request(mssqlConnect);
request.query(query, function (err, recordset) {
if (err) return cb(err);
if (!connections[connection].persistent) {
if (connections[connection] && !connections[connection].persistent) {
mssqlConnect && mssqlConnect.close();
}
cb(null, recordset);
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": "sails-sqlserver",
"version": "0.10.8",
"version": "0.10.9",
"description": "Official SQL Server Adapter for Sails / Waterline",
"main": "lib/adapter.js",
"scripts": {
Expand Down

0 comments on commit d120f0b

Please sign in to comment.