diff --git a/packages/hoppscotch-data/src/variables.ts b/packages/hoppscotch-data/src/variables.ts index 77c1be3a5..8b217d300 100644 --- a/packages/hoppscotch-data/src/variables.ts +++ b/packages/hoppscotch-data/src/variables.ts @@ -61,11 +61,7 @@ export function parseTemplateStringEV( errorBound++ } - if (depth <= ENV_MAX_EXPAND_LIMIT && errorBound <= ENV_MAX_EXPAND_LIMIT) { - return E.right(result) - } else { - return E.left(ENV_EXPAND_LOOP) - } + return depth <= ENV_MAX_EXPAND_LIMIT && errorBound <= ENV_MAX_EXPAND_LIMIT ? E.right(result) : E.left(ENV_EXPAND_LOOP); } /**