Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 4e9e419

Browse files
committedMar 7, 2022
Use replace instead of replaceAll for nodejs compat
Older nodejs versions may not have this function.
1 parent 6faae9e commit 4e9e419

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/Descriptor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ function escapedName(desc: Descriptor): string {
6161
if (isSimpleIdentifier(desc.name)) {
6262
return desc.name
6363
}
64-
return '`' + desc.name.replaceAll('`', '``') + '`'
64+
return '`' + desc.name.replace(/`/g, '``') + '`'
6565
}
6666

6767
// Returns true if this name does not need to be backtick escaped

0 commit comments

Comments
 (0)
Please sign in to comment.