From 8ca4d65eaa4fff148af0dbce35a5f0d24a03e935 Mon Sep 17 00:00:00 2001 From: Barry Pollard Date: Tue, 16 Sep 2025 22:30:17 +0100 Subject: [PATCH] Add error checking to origin-trials custom metric --- dist/origin-trials.js | 1 + 1 file changed, 1 insertion(+) diff --git a/dist/origin-trials.js b/dist/origin-trials.js index 5fe35ef..5c9686b 100644 --- a/dist/origin-trials.js +++ b/dist/origin-trials.js @@ -123,6 +123,7 @@ function validate(tokenElem) { * @returns {any} value */ function getParameterCaseInsensitive(object, key) { + if (!object || !key) return; return object[Object.keys(object).find(k => k.toLowerCase() === key.toLowerCase())]; }