You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constfnObj={// return a function$forceUpdate: ()=>()=>console.log('fn')}constobj={}constproxy=newProxy(obj,{get(target,key){if(fnObj[key]){returnfnObj[key]()}returnundefined}})letfn1=proxy.$forceUpdateletfn2=proxy.$forceUpdateconsole.log(fn1===fn2)//false
Version
3.2.31
Reproduction link
sfc.vuejs.org/
Steps to reproduce
let beforeMountForceUpdate;
let beforeUnmountForceUpdate;
beforeMount() {
beforeMountForceUpdate = this.$forceUpdate;
listenable.addEventListener("change", this.$forceUpdate);
},
beforeUnmount() {
beforeUnmountForceUpdate = this.$forceUpdate;
console.log(beforeMountForceUpdate === beforeUnmountForceUpdate);
listenable.removeEventListener("change", this.$forceUpdate);
}
What is expected?
beforeMountForceUpdate === beforeUnmountForceUpdate
What is actually happening?
beforeMountForceUpdate !== beforeUnmountForceUpdate
Results in memory leaks.
The text was updated successfully, but these errors were encountered: