We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6c50d7f commit d470006Copy full SHA for d470006
packages/runtime-core/src/componentPublicInstance.ts
@@ -1,4 +1,4 @@
1
-import { hasOwn } from "@mini-vue/shared";
+import { hasOwn, EMPTY_OBJ } from "@mini-vue/shared";
2
3
const publicPropertiesMap = {
4
// 当用户调用 instance.proxy.$emit 时就会触发这个函数
@@ -40,7 +40,7 @@ export const PublicInstanceProxyHandlers = {
40
set({ _: instance }, key, value) {
41
const { setupState } = instance;
42
43
- if (setupState !== {} && hasOwn(setupState, key)) {
+ if (hasOwn(setupState, key)) {
44
// 有的话 那么就直接赋值
45
setupState[key] = value;
46
}
0 commit comments