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
In server.js, I've noticed that there are return statements after some calls to sendBadge() but not after others. In my patch for Github license support, I've found that leaving out return leads to problems, so I've added them after all of the calls in my code.
TL;DR: Is return necessary after every call to sendBadge()?
The text was updated successfully, but these errors were encountered:
What must not happen are two calls to sendBadge() for a single request, so as to avoid sending the response twice (which actually simply raises an exception, which we don't want).
What we also want to avoid are doing work (sending requests, etc.) which needn't be done. In most cases, if there isn't a return after sendBadge(), the rest of the function will get executed, which is pointless because the badge was already delivered.
In
server.js
, I've noticed that there arereturn
statements after some calls tosendBadge()
but not after others. In my patch for Github license support, I've found that leaving outreturn
leads to problems, so I've added them after all of the calls in my code.TL;DR: Is
return
necessary after every call tosendBadge()
?The text was updated successfully, but these errors were encountered: