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

feat(storefront): strf-9174 Product object in quick view on localhost not consistent with prod: #991

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
2 changes: 0 additions & 2 deletions server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ function buildManifest(srcManifest, options) {
pluginsByName['./plugins/renderer/renderer.module'].storeUrl = storeUrl;
pluginsByName['./plugins/renderer/renderer.module'].storeSettingsLocale =
options.storeSettingsLocale;
pluginsByName['./plugins/renderer/renderer.module'].customLayouts =
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is duplicate of line 30 above

options.dotStencilFile.customLayouts;
pluginsByName['./plugins/theme-assets/theme-assets.module'].themePath = options.themePath;

resManifest.register.plugins = _.reduce(
Expand Down
4 changes: 3 additions & 1 deletion server/plugins/renderer/renderer.module.js
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,9 @@ internals.buildReqHeaders = ({
'stencil-custom-templates': templates,
};

if (!request.headers['stencil-config'] && stencilConfig) {
const config = request.headers['stencil-config'];

if ((!config || config === '{}') && stencilConfig) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the header can be undefined and can be empty object?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about undefined, I decided not to touch existing check just not to break anything. However, it definitely could be empty object. I saw that during debugging.

headers['stencil-config'] = JSON.stringify(stencilConfig);
}
// eslint-disable-next-line no-param-reassign
Expand Down