Skip to content

Commit

Permalink
fix: not using latest API version for SFDX
Browse files Browse the repository at this point in the history
  • Loading branch information
Codeneos committed Sep 29, 2022
1 parent 155cefe commit 42f703a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/util/src/sfdx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,10 @@ export namespace sfdx {

export async function getJsForceConnection(username?: string) : Promise<salesforce.Connection> {
const org = await getOrg(username);
const connection = org.getConnection() as unknown;
const connection = org.getConnection() as any;
if (typeof connection.useLatestApiVersion === 'function') {
await connection.useLatestApiVersion();
}
return connection as salesforce.Connection;
}
}

0 comments on commit 42f703a

Please sign in to comment.