Skip to content

Commit ff22aac

Browse files
authored
Merge pull request #464 from IBM/issue-460
fix: Make CONNECTION_CLOSED_ERROR a static property
2 parents b011bd9 + 266d0b0 commit ff22aac

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/Connection.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const { Cursor } = require('./Cursor');
33

44
class Connection {
55

6-
CONNECTION_CLOSED_ERROR = 'Connection has already been closed!';
6+
static CONNECTION_CLOSED_ERROR = 'Connection has already been closed!';
77

88
/**
99
* An open connection to the database made through an ODBC driver
@@ -26,7 +26,7 @@ class Connection {
2626
get autocommit() {
2727
if (!this.odbcConnection)
2828
{
29-
throw new Error(CONNECTION_CLOSED_ERROR);
29+
throw new Error(Connection.CONNECTION_CLOSED_ERROR);
3030
}
3131
return this.odbcConnection.autocommit;
3232
}

0 commit comments

Comments
 (0)