The comparison of empty objects seems to be wrong
Version
3.0.5
Reproduction link
componentPublicInstance.ts#L286-L301
What is expected?
var props = {}
const EMPTY_OBJ: { readonly [key: string]: any } = __DEV__
? Object.freeze({})
: {} // actually EMPTY_OBJ = Object.freeze({}) or EMPTY_OBJ={}
console.log(props===EMPTY_OBJ) // Always false
console.log(props!==EMPTY_OBJ) // Always true
console.log({}==={}) // Always false
What is actually happening?
I'm not quite sure if what I said was wrong~~
If you have found a bug please provide a reproduction, if you have a code improvement proposal, please open a pull request
If you have found a bug please provide a reproduction, if you have a code improvement proposal, please open a pull request
Hi, @posva: Sorry about that.
Can you help a little to explain the above phenomenon? I'm not quite sure if the error I'm pointing out is correct.
If what I say is correct, I will initiate a PR in the follow-up to suggest improvements.