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
// copy from src/utils/shallowEqual.jsconsthasOwn=Object.prototype.hasOwnPropertyfunctionshallowEqual(a,b){if(a===b)returntrueletcountA=0letcountB=0for(letkeyina){if(hasOwn.call(a,key)&&a[key]!==b[key])returnfalsecountA++// should check hasOwn.call(a, key) === true and then countA++ ?}for(letkeyinb){if(hasOwn.call(b,key))countB++}returncountA===countB}// my exampleObject.prototype.bar='bar'leta={x: '1'}letb={x: '1'}shallowEqual(a,b)// return false
it's a misunderstanding or there are some reasons for this?
The text was updated successfully, but these errors were encountered:
it's a misunderstanding or there are some reasons for this?
The text was updated successfully, but these errors were encountered: