You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you use an object that contains a buffer (for example _id coming from MongoDB), calling methods like toString crash with the error "TypeError: argument must be a buffer".
Here is a test that verifies this:
it("Proxied Buffer.toString outputs the pristine Buffer.toString",async(assert)=>{constmodel={id: Buffer.from("5fea9621e6efdf282752f5ba")};constproxy=ObservableSlim.create(model);expect(proxy.id.toString()).to.equal(model.id.toString())});
The text was updated successfully, but these errors were encountered:
@MZanggl My apologies for not seeing this until now! I'll take a look into this to see what can be done. However, Observable-Slim in general is intended to be used with "plain" objects. Specialized objects like Date even have trouble with native Proxy functionality let alone Observable-Slim.
If you use an object that contains a buffer (for example _id coming from MongoDB), calling methods like
toString
crash with the error "TypeError: argument must be a buffer".Here is a test that verifies this:
The text was updated successfully, but these errors were encountered: