Skip to content

Commit

Permalink
[Vue] Styleguide-Layout-Reuse breaks EE (#937)
Browse files Browse the repository at this point in the history
* [Vue] Styleguide-Layout-Reuse breaks EE

* Use `data` attribute

* Update CHANGELOG

* Use `elem` instead of `data`
  • Loading branch information
illiakovalenko authored Mar 3, 2022
1 parent 702c7ec commit 2d9d346
Show file tree
Hide file tree
Showing 3 changed files with 95 additions and 52 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ This project does NOT adhere to [Semantic Versioning](https://semver.org/spec/v2
* Console error when /graphql requested in EE, localhost or horizon ([#803](https://github.com/Sitecore/jss/pull/803))

`[vue]`
* Styleguide-Layout-Reuse breaks EE ([#938](https://github.com/Sitecore/jss/pull/938))
* The page is redirected to the home page of the website after clicking the "Change associated content" button in the Experience Editor ([#907](https://github.com/Sitecore/jss/pull/907))
* Cannot add a new rendering to the newly created ([#903](https://github.com/Sitecore/jss/pull/903))
* `[Horizon]` Cannot add a new rendering or highlight existing ([#895](https://github.com/Sitecore/jss/pull/895))
Expand Down
4 changes: 2 additions & 2 deletions packages/sitecore-jss-vue/src/components/PlaceholderCommon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ export function convertVNodesToDynamicComponents(vnodes: VNode[]) {
},
} as JssDynamicComponent;

if (vnode.type === 'code' && vnode.props.type === 'text/sitecore') {
if (vnode.props.elem?.name === 'code' && vnode.props.elem?.type === 'text/sitecore') {
component.isxEditorComponent = true;
}
return component;
Expand Down Expand Up @@ -234,7 +234,7 @@ function createRawElement(elem: any) {
},
};

return h(component);
return h(component, { elem });
}

/**
Expand Down
Loading

0 comments on commit 2d9d346

Please sign in to comment.