Skip to content

Commit c5fd0b9

Browse files
committed
fix: prevent transform $() to refs
1 parent 88669db commit c5fd0b9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/raw.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ export async function transformReactivityFunction(
134134
s.remove(node.callee.start, node.callee.start + 1)
135135
}
136136

137-
if (calleeName.endsWith('$')) {
137+
if (calleeName.endsWith('$') && !['$', '$$'].includes(calleeName)) {
138138
s.remove(node.callee.end - 1, node.callee.end)
139139

140140
node.arguments.forEach((argument) => {

src/volar.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ function transformReactivityFunction(options: {
210210
)
211211
}
212212

213-
if (calleeName.endsWith('$')) {
213+
if (calleeName.endsWith('$') && !['$', '$$'].includes(calleeName)) {
214214
replaceSourceRange(
215215
codes,
216216
source,

0 commit comments

Comments
 (0)