Skip to content

Commit 8064c6b

Browse files
committed
lint
1 parent 2335f5f commit 8064c6b

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

src/Adapters/Storage/Mongo/MongoStorageAdapter.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ const MongoSchemaCollectionName = '_SCHEMA';
3232
* (connection pool, network, server selection) as opposed to a query-level error.
3333
*/
3434
function isTransientError(error) {
35-
if (!error) return false;
35+
if (!error) {
36+
return false;
37+
}
3638

3739
// Connection pool, network, and server selection errors
3840
const transientErrorNames = [
@@ -41,11 +43,15 @@ function isTransientError(error) {
4143
'MongoNetworkTimeoutError',
4244
'MongoNetworkError',
4345
];
44-
if (transientErrorNames.includes(error.name)) return true;
46+
if (transientErrorNames.includes(error.name)) {
47+
return true;
48+
}
4549

4650
// Check for MongoDB's transient transaction error label
4751
if (typeof error.hasErrorLabel === 'function') {
48-
if (error.hasErrorLabel('TransientTransactionError')) return true;
52+
if (error.hasErrorLabel('TransientTransactionError')) {
53+
return true;
54+
}
4955
}
5056

5157
return false;

0 commit comments

Comments
 (0)