It seems we should judge the equation between this[key] and value, so this.equals should be this[key].equals instead in line 27 and line 28.
this[key]
value
this.equals
this[key].equals
Seems legit! wanna try a PR?