Skip to content

Commit 266d0b0

Browse files
committed
fix: Make CONNECTION_CLOSED_ERROR a static property
Fixes #460
1 parent b011bd9 commit 266d0b0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

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)