Skip to content

Commit 8ede527

Browse files
authored
regression: Apps Engine failing to respond apps' api when app returned no headers (#36314)
1 parent d6d78d4 commit 8ede527

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/apps-engine/src/definition/api/ApiEndpoint.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export abstract class ApiEndpoint implements IApiEndpoint {
3030
* @param reponse
3131
*/
3232
protected json(response: IApiResponseJSON): IApiResponse {
33-
if (!response?.headers['content-type']) {
33+
if (!response?.headers?.['content-type']) {
3434
response.headers = response.headers || {};
3535
response.headers['content-type'] = 'application/json';
3636
}

0 commit comments

Comments
 (0)