SiyaoIsHiding commented on code in PR #462:
URL:
https://github.com/apache/cassandra-nodejs-driver/pull/462#discussion_r3352752959
##########
lib/promise-utils.js:
##########
@@ -149,7 +149,7 @@ function times(count, limit, fn) {
* @returns {undefined}
*/
function toBackground(promise) {
- promise.catch(() => {});
+ promise?.catch(() => {});
Review Comment:
This is an internal util not exposed to the users.
But why allow the argument to be null tho? Currently all usages in this
package are passing non-null promises. Sounds like allowing it to be null can
make bugs harder to notice.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]