Skip to content

Commit 4e241b9

Browse files
committed
refactor: improve variable naming for clarity in Salesforce connection function
1 parent bd4007c commit 4e241b9

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lana/src/salesforce/logs/SalesforceConnection.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ export async function getSalesforceConnection(wsPath: string): Promise<Connectio
1414
const { ConfigAggregator, OrgConfigProperties, Org } = await import('@salesforce/core');
1515

1616
const aggregator = await ConfigAggregator.create({ projectPath: wsPath });
17-
const usernameOrAlias = aggregator.getPropertyValue(OrgConfigProperties.TARGET_ORG);
17+
const aliasOrUsername = aggregator.getPropertyValue<string>(OrgConfigProperties.TARGET_ORG);
1818

19-
if (!usernameOrAlias) {
19+
if (!aliasOrUsername) {
2020
throw new Error('No default org configured for workspace');
2121
}
2222

23-
const org = await Org.create({ aliasOrUsername: String(usernameOrAlias) });
23+
const org = await Org.create({ aliasOrUsername });
2424
return org.getConnection();
2525
}

0 commit comments

Comments
 (0)