now patterns seem to work, but still not too happy with the code...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2018-07-28 01:13:58 +03:00
parent d45db4d848
commit 7288e9acba

11
diff.js
View File

@ -256,9 +256,8 @@ var LogicTypePrototype = {
} }
var res = this.__cmp__(obj, cmp, cache) var res = this.__cmp__(obj, cmp, cache)
|| (obj.__cmp__ ? || (obj.__cmp__
obj.__cmp__(this, cmp, cache) && obj.__cmp__(this, cmp, cache))
: false)
c.set(obj, res) c.set(obj, res)
return res return res
@ -772,7 +771,11 @@ module.Types = {
// same object... // same object...
if(bcmp(A, B)){ // XXX this will essentially do a full diff of sub-objects, not
// sure if this is the right way to go here...
// ...this is not that big a dean as we are caching everything
// but still this is not obvious...
if(bcmp(A, B, cmp)){
return null return null
} }