Skip to content

Commit c8a18ad

Browse files
committed
Fix: missing reserved prop ref_key, leading to unwanted property leak in SSR code generation. (fix #5563)
1 parent 1070f12 commit c8a18ad

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

packages/server-renderer/__tests__/ssrRenderAttrs.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ describe('ssr: renderAttrs', () => {
1515
expect(
1616
ssrRenderAttrs({
1717
key: 1,
18+
ref_key: 'foo',
1819
ref: () => {},
1920
onClick: () => {}
2021
})

packages/server-renderer/src/helpers/ssrRenderAttrs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
} from '@vue/shared'
1313

1414
// leading comma for empty string ""
15-
const shouldIgnoreProp = makeMap(`,key,ref,innerHTML,textContent`)
15+
const shouldIgnoreProp = makeMap(`,key,ref,innerHTML,textContent,ref_key`)
1616

1717
export function ssrRenderAttrs(
1818
props: Record<string, unknown>,

0 commit comments

Comments
 (0)