Skip to content

Commit 6dff313

Browse files
authored
fix: use looseValidation for cloning ConnectionString instances (#21)
So that ones that were created with `looseValidation: true` can also be cloned.
1 parent cac1879 commit 6dff313

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,9 @@ export class ConnectionString extends URLWithoutHost {
221221
}
222222

223223
clone(): ConnectionString {
224-
return new ConnectionString(this.toString());
224+
return new ConnectionString(this.toString(), {
225+
looseValidation: true
226+
});
225227
}
226228

227229
redact(options?: ConnectionStringRedactionOptions): ConnectionString {

0 commit comments

Comments
 (0)