Skip to content

Commit 30968a2

Browse files
janfabiannodkz
authored andcommitted
fix(Sort): replace non letters from index name globally
1 parent d2a2a18 commit 30968a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/resolvers/helpers/sort.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export function getSortTypeFromModel(typeName: string, model: MongooseModel): Gr
5050
let name = keys
5151
.join('__')
5252
.toUpperCase()
53-
.replace(/[^_a-zA-Z0-9]/i, '__');
53+
.replace(/[^_a-zA-Z0-9]/gi, '__');
5454
if (indexData[keys[0]] === 1) {
5555
name = `${name}_ASC`;
5656
} else if (indexData[keys[0]] === -1) {

0 commit comments

Comments
 (0)