mirror of
https://github.com/jlengrand/openapi-generator.git
synced 2026-03-10 08:31:23 +00:00
In order to avoid a compiler error when using `noImplicitReturns `, we change the mustache template to use provide a return value for the if- and else branch. Fixes #9174.
This commit is contained in:
@@ -70,9 +70,9 @@ export class {{configurationClassName}} {
|
||||
{{#isBasic}}
|
||||
{{#isBasicBasic}}
|
||||
this.credentials['{{name}}'] = () => {
|
||||
if (this.username || this.password) {
|
||||
return btoa(this.username + ':' + this.password);
|
||||
}
|
||||
return (this.username || this.password)
|
||||
? btoa(this.username + ':' + this.password)
|
||||
: undefined;
|
||||
};
|
||||
{{/isBasicBasic}}
|
||||
{{#isBasicBearer}}
|
||||
|
||||
Reference in New Issue
Block a user