From 4e42f1d2d19fc3fb61a879cc98b6319738bfdb12 Mon Sep 17 00:00:00 2001 From: Arnaud Barisain-Monrose Date: Fri, 23 Aug 2024 08:59:27 +0200 Subject: [PATCH] profile: prevent accidental "undefined" as profile identifier --- src/BatchProfile.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/BatchProfile.ts b/src/BatchProfile.ts index ad8ca12..62c3685 100644 --- a/src/BatchProfile.ts +++ b/src/BatchProfile.ts @@ -48,6 +48,9 @@ export const BatchProfile = { * If a profile already exists, this device will be attached to it. Must not be longer than 1024 characters. */ identify: (identifier: string | null): void => { + if (typeof identifier === 'undefined') { + return; + } RNBatch.profile_identify(identifier); },