From 266d0b013c7885281426983d3e172c59c43540f6 Mon Sep 17 00:00:00 2001 From: Korinne Adler Date: Tue, 31 Mar 2026 15:46:58 -0500 Subject: [PATCH] fix: Make CONNECTION_CLOSED_ERROR a static property Fixes #460 --- lib/Connection.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Connection.js b/lib/Connection.js index 274fe7b2..a9efd3a5 100644 --- a/lib/Connection.js +++ b/lib/Connection.js @@ -3,7 +3,7 @@ const { Cursor } = require('./Cursor'); class Connection { - CONNECTION_CLOSED_ERROR = 'Connection has already been closed!'; + static CONNECTION_CLOSED_ERROR = 'Connection has already been closed!'; /** * An open connection to the database made through an ODBC driver @@ -26,7 +26,7 @@ class Connection { get autocommit() { if (!this.odbcConnection) { - throw new Error(CONNECTION_CLOSED_ERROR); + throw new Error(Connection.CONNECTION_CLOSED_ERROR); } return this.odbcConnection.autocommit; }