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 don't use middleware, there is no problem, the mappers work fine.
But if you decide to use middlware to verify if the projectId is valid (like I did) you will run across a bug because the projectToBody mapper function will get called twice. (Once when checking the id, and another when returning the updated field). so when intToBoolean runs the second time, it will be comparing true/false to 1 and that will always be false (even if the action has been completed). I had to change line 9 in mappers.js from return int === 1 ? true : false; to return int === 1 || int === true ? true : false; for it to work for me.
The text was updated successfully, but these errors were encountered:
Im having this same problem, and came to this same conclusion but wasn't sure if id be allowed to change it. Ill go ahead and make that same change so I can be done with this. hopefully, they patch that. the intToBoolean is too strict IMO
If you don't use middleware, there is no problem, the mappers work fine.
But if you decide to use middlware to verify if the projectId is valid (like I did) you will run across a bug because the projectToBody mapper function will get called twice. (Once when checking the id, and another when returning the updated field). so when intToBoolean runs the second time, it will be comparing true/false to 1 and that will always be false (even if the action has been completed). I had to change line 9 in mappers.js from
return int === 1 ? true : false;
toreturn int === 1 || int === true ? true : false;
for it to work for me.The text was updated successfully, but these errors were encountered: