Skip to content

Commit 4156c3b

Browse files
Stefan SchubertStefan Schubert
authored andcommitted
add assertion for entering default value callback
1 parent 1b82e86 commit 4156c3b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mustache/api.service.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ export class {{classname}} {
184184
{{/hasQueryParams}}
185185
let headers = {{#useHttpClient}}this.defaultHeaders;{{/useHttpClient}}{{^useHttpClient}}new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845{{/useHttpClient}}
186186
{{#headerParams}}
187-
if(typeof this.configuration.defaultHeaderValue === 'function') {
187+
if(typeof this.configuration.defaultHeaderValue === 'function' && ({{paramName}} === undefined || {{paramName}} === null)) {
188188
{{paramName}} = this.configuration.defaultHeaderValue('{{paramName}}');
189189
}
190190
{{#isListContainer}}

0 commit comments

Comments
 (0)