Skip to content
This repository was archived by the owner on Sep 5, 2025. It is now read-only.

Commit b682b97

Browse files
committed
Fixed bug
1 parent 31aa883 commit b682b97

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/txn.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ var Txn = (function () {
4343
this.finished = false;
4444
this.mutated = false;
4545
this.dc = dc;
46-
if (options.bestEffort && !options.readOnly) {
46+
if (options && options.bestEffort && !options.readOnly) {
4747
this.dc.debug('Best effort only works with read-only queries.');
4848
throw errors_1.ERR_ABORTED;
4949
}

src/txn.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export class Txn {
3030
constructor(dc: DgraphClient, options?: TxnOptions) {
3131
this.dc = dc;
3232

33-
if (options.bestEffort && !options.readOnly) {
33+
if (options && options.bestEffort && !options.readOnly) {
3434
this.dc.debug('Best effort only works with read-only queries.');
3535
throw ERR_ABORTED;
3636
}

0 commit comments

Comments
 (0)