Skip to content

Commit fce1a49

Browse files
authored
Merge pull request #1544 from CommanderRoot/refactor/rm-deprecated-substr
refactor: replace deprecated String.prototype.substr()
2 parents 810e6a4 + 5619c22 commit fce1a49

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/connection_config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ class ConnectionConfig {
145145
// "+" is a url encoded char for space so it
146146
// gets translated to space when giving a
147147
// connection string..
148-
this.timezone = `+${this.timezone.substr(1)}`;
148+
this.timezone = `+${this.timezone.slice(1)}`;
149149
}
150150
if (this.ssl) {
151151
if (typeof this.ssl !== 'object') {
@@ -253,7 +253,7 @@ class ConnectionConfig {
253253
const options = {
254254
host: parsedUrl.hostname,
255255
port: parsedUrl.port,
256-
database: parsedUrl.pathname.substr(1),
256+
database: parsedUrl.pathname.slice(1),
257257
user: parsedUrl.username,
258258
password: parsedUrl.password
259259
};

0 commit comments

Comments
 (0)