We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ac853ff commit a5a66c5Copy full SHA for a5a66c5
packages/compiler-sfc/src/compileScript.ts
@@ -946,11 +946,13 @@ export function compileScript(
946
allBindings[key] = true
947
}
948
949
- returned = `{ ${Object.keys(allBindings).join(', ')}${
+ const keys = Object.keys(allBindings)
950
+ if (!__TEST__) {
951
// the `__isScriptSetup: true` flag is used by componentPublicInstance
952
// proxy to allow properties that start with $ or _
- __TEST__ ? `` : `, __isScriptSetup: true`
953
- } }`
+ keys.push(`__isScriptSetup: true`)
954
+ }
955
+ returned = `{ ${keys.join(', ')} }`
956
957
s.appendRight(endOffset, `\nreturn ${returned}\n}\n\n`)
958
0 commit comments