From 5b34c481726897d5777a45964d54a997edffb6dc Mon Sep 17 00:00:00 2001 From: Adam Chalmers Date: Fri, 14 Feb 2025 19:31:14 -0600 Subject: [PATCH] Update isTagUsedInEdgeTreatment to handle the new kwargs --- src/lang/modifyAst/addEdgeTreatment.ts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/lang/modifyAst/addEdgeTreatment.ts b/src/lang/modifyAst/addEdgeTreatment.ts index 0da6e96446..54be93d09a 100644 --- a/src/lang/modifyAst/addEdgeTreatment.ts +++ b/src/lang/modifyAst/addEdgeTreatment.ts @@ -754,6 +754,16 @@ export const isTagUsedInEdgeTreatment = ({ ) { inEdgeTreatment = true } + if (inEdgeTreatment && node.type === 'CallExpressionKw') { + node.arguments.forEach((prop) => { + if ( + prop.label.name === 'tags' && + prop.arg.type === 'ArrayExpression' + ) { + inObj = true + } + }) + } if (inEdgeTreatment && node.type === 'ObjectExpression') { node.properties.forEach((prop) => { if ( @@ -798,6 +808,16 @@ export const isTagUsedInEdgeTreatment = ({ ) { inEdgeTreatment = false } + if (inEdgeTreatment && node.type === 'CallExpressionKw') { + node.arguments.forEach((prop) => { + if ( + prop.label.name === 'tags' && + prop.arg.type === 'ArrayExpression' + ) { + inObj = true + } + }) + } if (inEdgeTreatment && node.type === 'ObjectExpression') { node.properties.forEach((prop) => { if (