Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[sitecore-jss] Handle null items in graphql layout service #1771

Merged
merged 2 commits into from
Apr 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file. The format

This project does NOT adhere to [Semantic Versioning](https://semver.org/spec/v2.0.0.html), and major versions of this project denote compatibility with Sitecore Platform versions. Refer to the "Headless Services" section in the [Sitecore modules compatibility table](https://support.sitecore.com/kb?id=kb_article_view&sysparm_article=KB1000576) or the [Headless Rendering download page](https://dev.sitecore.net/Downloads/Sitecore_Headless_Rendering.aspx) for more details on versioning.

## 20.3.2

### 🐛 Bug Fixes

* `[sitecore-jss]` Handle null items in graphql layout service ([#1771](https://github.com/Sitecore/jss/pull/1771))

## 20.3.1

### 🐛 Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion packages/sitecore-jss/src/layout/graphql-layout-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export class GraphQLLayoutService extends LayoutServiceBase {

// If `rendered` is empty -> not found
return (
data?.layout?.item.rendered || {
data?.layout?.item?.rendered || {
sitecore: { context: { pageEditing: false, language }, route: null },
}
);
Expand Down