Subscribe on changes!

createReactiveObject judge the target is proxyed bug

avatar
Oct 20th 2021

Version

3.2.20

Reproduction link

sfc.vuejs.org/

Steps to reproduce

let na = { __v_isReactive: true, name: "vue-next", };

console.log(na is , isReactive(na));

let proxyed = reactive({ na });

console.log(na is , na);

What is expected?

the first console result is true. the second console result a normal data not proxyed

What is actually happening?

the first console result is true. the second result is a proxyed reactive data


the function createReactiveObject in vue-next/reactivity judge the target is Proxyed can be optimized 。 the result the function isReactive() return should be same in function createReactiveObject judge the target

avatar
Oct 20th 2021

As you can imagine, you are not supposed to manually declare a property named __v_isReactive in an object you give to reactive()