Skip to content

Commit

Permalink
feat(storefront): strf-9174 Product object in quick view on localhost…
Browse files Browse the repository at this point in the history
… not consistent with prod: (#991)

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

-renderer.module - additional check for stencil-config added;
- index - duplicate code removed;
  • Loading branch information
bc-max authored Sep 27, 2022
1 parent ac2af92 commit 2f14d57
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
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 =
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) {
headers['stencil-config'] = JSON.stringify(stencilConfig);
}
// eslint-disable-next-line no-param-reassign
Expand Down

0 comments on commit 2f14d57

Please sign in to comment.