melanke / Watch.JS

watch the changes of any object or attribute
Other
2.14k stars 219 forks source link

Change comparison of datetime object to use its value instead of ref… #131

Closed dzhong closed 4 years ago

dzhong commented 4 years ago

We found an issue in our project when watch a property of DateTime type. The current code is comparing the reference of the DateTime object instead of its value. It will mark the property dirty after update it with a DateTime object which has the same DateTime value as before update . The change here is to compare the DateTime type with its value instead of reference.

dzhong commented 4 years ago

Hello melanke,

Thank you for merging the changes. Could you please update npm as well when you get a chance? We have a project need to use the WatchJs npm which has this fix.

Thanks for your help.

David Z

melanke commented 4 years ago

done: v1.5.1