From bf2f951f6bd25c44e3972e89cfba9c74b0085b70 Mon Sep 17 00:00:00 2001 From: Galen Date: Thu, 19 Sep 2024 10:13:27 -0500 Subject: [PATCH] fix: fall back to mixed parser if the field doesn't have a parser defined in the url --- src/services/variables.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/services/variables.ts b/src/services/variables.ts index eb6a9263a..2a074d00d 100644 --- a/src/services/variables.ts +++ b/src/services/variables.ts @@ -148,6 +148,14 @@ export function getValueFromFieldsFilter(filter: AdHocVariableFilter, variableNa return JSON.parse(filter.value); } catch (e) { console.error(`Failed to parse ${variableName}`, e); + + // If the user has a URL from before 0.1.4 where detected_fields changed the format of the fields value to include the parser, fall back to mixed parser if we have a value + if (filter.value) { + return { + value: filter.value, + parser: 'mixed', + }; + } throw e; } }