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
When trying to add a query parameter with an operator like "?createdAt_like=1491402693000" and the JSON data contains null values, this error is thrown in node_modules/json-server/lib/server/router/plural.js:122:64. Any of those elementValue.toString() calls could throw if they are tested against null.
I also noticed there is probably no way to use _like or _ne with null as value because there's no way to distinguish it from the string "null".
The text was updated successfully, but these errors were encountered:
A new operator could be useful. I've forked this for a client project to match their API and customised the query params by using JSON with operators, which allows to distinguish strings from other values like false or null... might be another idea for a future version.
When trying to add a query parameter with an operator like "?createdAt_like=1491402693000" and the JSON data contains null values, this error is thrown in
node_modules/json-server/lib/server/router/plural.js:122:64
. Any of thoseelementValue.toString()
calls could throw if they are tested againstnull
.I also noticed there is probably no way to use _like or _ne with
null
as value because there's no way to distinguish it from the string"null"
.The text was updated successfully, but these errors were encountered: