Skip to content

Commit

Permalink
Pass empty string if prefix/postfix is not defined
Browse files Browse the repository at this point in the history
  • Loading branch information
elszczepano authored Mar 13, 2021
1 parent ac8f921 commit 52cfee5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mfr",
"version": "1.1.1",
"version": "1.1.2",
"main": "dist/index.js",
"files": [
"/dist"
Expand Down
4 changes: 2 additions & 2 deletions src/drivers/Driver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export abstract class Driver implements IDriver {
return '';
}

return typeof prefixPattern === 'function' ? prefixPattern() : prefixPattern!;
return typeof prefixPattern === 'function' ? prefixPattern() : prefixPattern ?? '';
}

protected _getPostfix(): string {
Expand All @@ -62,6 +62,6 @@ export abstract class Driver implements IDriver {
return '';
}

return typeof postfixPattern === 'function' ? postfixPattern() : postfixPattern!;
return typeof postfixPattern === 'function' ? postfixPattern() : postfixPattern ?? '';
}
}

0 comments on commit 52cfee5

Please sign in to comment.