visjs / vis-data

🗄️ Manage unstructured data using DataSet. Add, update, and remove data, and listen for changes in the data.
https://visjs.github.io/vis-data/
102 stars 20 forks source link

updateOnly method doesn't work properly when using Date object #1014

Open alexdeia opened 1 year ago

alexdeia commented 1 year ago

See details https://github.com/visjs/vis-timeline/issues/1562

update method works properly, but updateOnly loses Date object and reset it to empty object {}

p.s. Don't pay attention to vue-visjs name of package, I use wrapper for vue. It is ok, I checked it on just vis-data

vue-visjs.esm.js:15300 Uncaught TypeError: Cannot convert object of type Object to type Date
    at convert (vue-visjs.esm.js:15300:181)
    at vue-visjs.esm.js:15334:238
    at Array.reduce (<anonymous>)
    at vue-visjs.esm.js:15334:210
    at Array.map (<anonymous>)
    at vue-visjs.esm.js:11424:44
    at vue-visjs.esm.js:11341:14
    at Array.reduce (<anonymous>)
    at SimpleDataPipe._transformItems (vue-visjs.esm.js:11340:31)
    at SimpleDataPipe._update (vue-visjs.esm.js:11366:30)