Skip to content

Commit

Permalink
Call the function fed into the promise resolver
Browse files Browse the repository at this point in the history
resolver should be the name used just to be consistent with all other code.
  • Loading branch information
danieljbruce committed Nov 23, 2023
1 parent 8ed092e commit daae54d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -779,9 +779,7 @@ class Transaction extends DatastoreRequest {
if (options.transactionOptions) {
reqOpts.transactionOptions = options.transactionOptions;
}
const promiseFunction: Resolver<
google.datastore.v1.IBeginTransactionResponse
> = (
const resolver: Resolver<google.datastore.v1.IBeginTransactionResponse> = (
resolve: PromiseResolveFunction<google.datastore.v1.IBeginTransactionResponse>
) => {
this.request_(
Expand All @@ -800,7 +798,7 @@ class Transaction extends DatastoreRequest {
}
);
};
return new Promise(promiseFunction);
return new Promise(resolver);
}

/**
Expand Down

0 comments on commit daae54d

Please sign in to comment.