From f8faeb2690cd095f6b1296c24c2a2cb0dfa443f5 Mon Sep 17 00:00:00 2001 From: Michel Weststrate Date: Thu, 4 Mar 2021 05:59:40 -0800 Subject: [PATCH] Fix incorrect assumption on device id's Summary: In dev mode a (further harmless) error will be triggered if the self inspection plugin is loaded, since the device_id is empty. empty device id's however are fine; the represent the host device (Mac / Win devices) Reviewed By: passy Differential Revision: D26814269 fbshipit-source-id: 281fc591c1df47092011b4140099fc7138718b43 --- desktop/app/src/utils/clientUtils.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/desktop/app/src/utils/clientUtils.tsx b/desktop/app/src/utils/clientUtils.tsx index 47a38113c..8ad37d379 100644 --- a/desktop/app/src/utils/clientUtils.tsx +++ b/desktop/app/src/utils/clientUtils.tsx @@ -63,7 +63,8 @@ export function buildClientId(clientInfo: { device: string; device_id: string; }): string { - for (const key of ['app', 'os', 'device', 'device_id'] as Array< + // N.B.: device_id can be empty, which designates the host device + for (const key of ['app', 'os', 'device'] as Array< keyof ClientIdConstituents >) { if (!clientInfo[key]) {