It throws an exception when calling a method on the date when details is true.
import onChange from 'on-change';
let proxy = onChange({ d: new Date() }, () => {}, { details: true});
proxy.d.getDate();
// throws
// file:///C:/Users/lars.roald/repos/rdb-demo/node_modules/on-change/index.js:229
// return Reflect.apply(target, thisArg, argumentsList);
// ^
// TypeError: this is not a Date object.
// at Proxy.getDate (<anonymous>)
// at Object.apply β[90m(file:///C:/Users/lars.roald/repos/rdb-demo/β[39mnode_modules/β[4mon-changeβ[24m/index.js:229:19β[90m)β[39m
// at β[90mfile:///C:/Users/lars.roald/repos/rdb-demo/β[39mchangeTest.mjs:4:9
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too