We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 99145d1 commit 1d6eef6Copy full SHA for 1d6eef6
packages/mongodb-log-writer/src/mongo-log-manager.ts
@@ -36,8 +36,7 @@ export class MongoLogManager {
36
_options: MongoLogOptions;
37
38
constructor(options: MongoLogOptions) {
39
- if (options.prefix) {
40
- if (!/^[a-z0-9_]+$/i.test(options.prefix)) {
+ if (options.prefix && !/^[a-z0-9_]+$/i.test(options.prefix)) {
41
throw new Error(
42
'Prefix must only contain letters, numbers, and underscores'
43
);
0 commit comments