mswjs / data

Data modeling and relation library for testing JavaScript applications.
https://npm.im/@mswjs/data
MIT License
827 stars 52 forks source link

g is not a function error on update method #211

Closed MalkaGloiberman closed 2 years ago

MalkaGloiberman commented 2 years ago

I try to update like that: const updatedCar = await db.cars.update( {where: { id: { equals: req.params.carId } },data:car});`` and I got this error: Error updating plan FetchError { message: 'request to https://localhost:3000/cars/car-aXRDL1BDKBRlCs failed, reason: g is not a function', type: 'system', errno: undefined, code: undefined }

` what could be the problem?

kettanaito commented 2 years ago

Hey, @MalkaGloiberman.

Could you please provide a reproduction repository for this? Something is likely wrong with how the library is used (or we have a bug, that's always a possibility) but I can't do much if I can't reproduce this. Thanks.