Skip to content

Commit 78fc9f3

Browse files
comments
1 parent 07b21f1 commit 78fc9f3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/cursor/abstract_cursor.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -905,7 +905,7 @@ export abstract class AbstractCursor<
905905
);
906906
}
907907

908-
if (!this.cursorSession) {
908+
if (this.cursorSession == null) {
909909
throw new MongoRuntimeError(
910910
'Unexpected null session. A cursor creating command should have set this'
911911
);
@@ -1081,7 +1081,7 @@ export abstract class AbstractCursor<
10811081
if (session.owner === this) {
10821082
await session.endSession({ error });
10831083
}
1084-
if (!session?.inTransaction()) {
1084+
if (!session.inTransaction()) {
10851085
maybeClearPinnedConnection(session, { error });
10861086
}
10871087
}

0 commit comments

Comments
 (0)