From e569c3b1ecbb8944d8e6e1227bc003e09e74f88e Mon Sep 17 00:00:00 2001 From: DavidGOrtega Date: Sun, 10 Jul 2022 12:40:35 +0200 Subject: [PATCH] deterministic check --- src/analytics.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/analytics.js b/src/analytics.js index b2e396de5..a0217bc42 100644 --- a/src/analytics.js +++ b/src/analytics.js @@ -35,6 +35,8 @@ const { const ID_DO_NOT_TRACK = 'do-not-track'; const deterministic = async (data) => { + if (!data) throw new Error('data is not set calculating deterministic uuid'); + const namespace = uuidv5('iterative.ai', uuidv5.DNS); const name = await promisify(scrypt)(data, parse(namespace), 8, { N: 1 << 16,