Skip to content

Commit 92cf6ab

Browse files
temp
1 parent f11898e commit 92cf6ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/error.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1191,7 +1191,7 @@ export class MongoWriteConcernError extends MongoServerError {
11911191
super({ ...result, ...result.writeConcernError });
11921192
this.errInfo = result.writeConcernError.errInfo;
11931193
this.result = result;
1194-
this.code = result.code ? result.code : undefined;
1194+
this.code = result.code ?? result.writeConcernError.code ?? undefined;
11951195
}
11961196

11971197
override get name(): string {

0 commit comments

Comments
 (0)