Sfoglia il codice sorgente

chore: fix compat props default test

Evan You 1 anno fa
parent
commit
c2ff3bd564
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      packages/runtime-core/src/componentProps.ts

+ 1 - 1
packages/runtime-core/src/componentProps.ts

@@ -201,7 +201,7 @@ export function initProps(
   isStateful: number, // result of bitwise flag comparison
   isSSR = false,
 ): void {
-  const props: Data = {}
+  const props: Data = (instance.props = {})
   const attrs: Data = createInternalObject()
 
   instance.propsDefaults = Object.create(null)