mswjs / data

Data modeling and relation library for testing JavaScript applications.

Home Page:https://npm.im/@mswjs/data

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

g is not a function error on update method

MalkaGloiberman opened this issue · comments

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?

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.