Date: Wed, 1 May 2024 08:56:01 -0700
Subject: [PATCH 2/2] refactor: use isStaticArgOf
---
.../src/transforms/stringifyStatic.ts | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/packages/compiler-dom/src/transforms/stringifyStatic.ts b/packages/compiler-dom/src/transforms/stringifyStatic.ts
index 5accb18283a..7d740798ebb 100644
--- a/packages/compiler-dom/src/transforms/stringifyStatic.ts
+++ b/packages/compiler-dom/src/transforms/stringifyStatic.ts
@@ -17,6 +17,7 @@ import {
type TextCallNode,
type TransformContext,
createCallExpression,
+ isStaticArgOf,
} from '@vue/compiler-core'
import {
escapeHtml,
@@ -200,6 +201,7 @@ function analyzeNode(node: StringifiableNode): [number, number] | false {
// probably only need to check for most common case
// i.e. non-phrasing-content tags inside ``
function walk(node: ElementNode): boolean {
+ const isOptionTag = node.tag === 'option' && node.ns === Namespaces.HTML
for (let i = 0; i < node.props.length; i++) {
const p = node.props[i]
// bail on non-attr bindings
@@ -225,18 +227,15 @@ function analyzeNode(node: StringifiableNode): [number, number] | false {
) {
return bail()
}
+ //