Skip to content

Commit

Permalink
Update isTagUsedInEdgeTreatment to handle the new kwargs
Browse files Browse the repository at this point in the history
  • Loading branch information
adamchalmers committed Feb 15, 2025
1 parent adf6ef4 commit 5b34c48
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/lang/modifyAst/addEdgeTreatment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down Expand Up @@ -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 (
Expand Down

0 comments on commit 5b34c48

Please sign in to comment.