Skip to content

Commit e872c38

Browse files
SashaMarchukclaude
andcommitted
fix(global): add defensive guard for req.data.global in nav endpoint
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent f7c3f7a commit e872c38

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • website/modules/@apostrophecms/global

website/modules/@apostrophecms/global/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ module.exports = {
137137
return {
138138
get: {
139139
nav(req) {
140-
const { global } = req.data;
140+
const global = req?.data?.global || {};
141141
return {
142142
primaryNav: global.primaryNav || [],
143143
footerLinks: global.footerLinks || [],

0 commit comments

Comments
 (0)