Skip to content

Commit 5669609

Browse files
committed
address comment
1 parent c3f0928 commit 5669609

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

src/helpers/connectionOptions.ts

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,8 @@ export async function setAppNameParamIfMissing({
3030
return connectionStringUrl.toString();
3131
}
3232

33-
// Get deviceId if not provided
34-
let deviceId = components.deviceId;
35-
if (!deviceId) {
36-
deviceId = await getDeviceIdForConnection();
37-
}
38-
39-
// Get clientName if not provided
40-
let clientName = components.clientName;
41-
if (!clientName) {
42-
clientName = "unknown";
43-
}
33+
const deviceId = components.deviceId || (await getDeviceIdForConnection());
34+
const clientName = components.clientName || "unknown";
4435

4536
// Build the extended appName format: appName--deviceId--clientName
4637
const extendedAppName = `${components.appName}--${deviceId}--${clientName}`;

0 commit comments

Comments
 (0)