Skip to content

Commit 1ca12ed

Browse files
committed
fix eslint issue
1 parent 37e314f commit 1ca12ed

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/promise-utils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,11 @@ function times(count, limit, fn) {
145145

146146
/**
147147
* Deals with unexpected rejections in order to avoid the unhandled promise rejection warning or failure.
148-
* @param {Promise} promise
148+
* @param {Promise | undefined} promise
149149
* @returns {undefined}
150150
*/
151151
function toBackground(promise) {
152-
promise?.catch(() => {});
152+
promise && promise.catch(() => {});
153153
}
154154

155155
/**

0 commit comments

Comments
 (0)