Skip to content

Commit

Permalink
fix(vue): support for component props defined as array
Browse files Browse the repository at this point in the history
  • Loading branch information
nolimits4web committed Dec 21, 2022
1 parent 65ecc23 commit d5c70e4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/vue/components/view.vue
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,11 @@ export default {
const { component: pageComponent, props: pageProps } = page;
let keys = [];
const passProps = {};
if (pageComponent && pageComponent.props) keys = Object.keys(pageComponent.props);
if (pageComponent && pageComponent.props) {
if (Array.isArray(pageComponent.props))
keys = pageComponent.props.filter((prop) => typeof prop === 'string');
else keys = Object.keys(pageComponent.props);
}
keys.forEach((key) => {
if (key in pageProps) passProps[key] = pageProps[key];
});
Expand Down

0 comments on commit d5c70e4

Please sign in to comment.