Skip to content

Commit

Permalink
ts: Validate error.data exists on simulation response (#2508)
Browse files Browse the repository at this point in the history
  • Loading branch information
rogaldh authored Jun 6, 2023
1 parent 65c9d6e commit a88be42
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ts/packages/anchor/src/utils/rpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ export async function simulateTransaction(
if ("error" in res) {
let logs;
if ("data" in res.error) {
logs = res.error.data.logs;
logs = res.error.data?.logs;
if (logs && Array.isArray(logs)) {
const traceIndent = "\n ";
const logTrace = traceIndent + logs.join(traceIndent);
Expand Down

1 comment on commit a88be42

@vercel
Copy link

@vercel vercel bot commented on a88be42 Jun 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

anchor-docs – ./

anchor-docs-200ms.vercel.app
anchor-docs-git-master-200ms.vercel.app
anchor-lang.com
www.anchor-lang.com

Please sign in to comment.