Skip to content

Commit

Permalink
Fix: missing reserved prop ref_key, leading to unwanted property leak…
Browse files Browse the repository at this point in the history
… in SSR code generation. (fix vuejs#5563)
  • Loading branch information
paraboul committed Mar 10, 2022
1 parent 1070f12 commit c8a18ad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/server-renderer/__tests__/ssrRenderAttrs.spec.ts
Expand Up @@ -15,6 +15,7 @@ describe('ssr: renderAttrs', () => {
expect(
ssrRenderAttrs({
key: 1,
ref_key: 'foo',
ref: () => {},
onClick: () => {}
})
Expand Down
2 changes: 1 addition & 1 deletion packages/server-renderer/src/helpers/ssrRenderAttrs.ts
Expand Up @@ -12,7 +12,7 @@ import {
} from '@vue/shared'

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

export function ssrRenderAttrs(
props: Record<string, unknown>,
Expand Down

0 comments on commit c8a18ad

Please sign in to comment.