Skip to content

Commit 50081c6

Browse files
use ?? operator when constructing index descriptions
1 parent 79084c8 commit 50081c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/operations/indexes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ export class CreateIndexesOperation extends CommandOperation<string[]> {
249249
// Ensure the key is a Map to preserve index key ordering
250250
const key =
251251
userIndex.key instanceof Map ? userIndex.key : new Map(Object.entries(userIndex.key));
252-
const name = userIndex.name != null ? userIndex.name : Array.from(key).flat().join('_');
252+
const name = userIndex.name ?? Array.from(key).flat().join('_');
253253
const validIndexOptions = resolveIndexDescription(userIndex);
254254
return {
255255
...validIndexOptions,

0 commit comments

Comments
 (0)