Skip to content

Commit

Permalink
Send props not defined on the route component in $attrs.
Browse files Browse the repository at this point in the history
Fixes #1695.
  • Loading branch information
lbogdan committed Aug 25, 2017
1 parent 8920c30 commit 02ae13a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/components/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,14 @@ export default {

// resolve props
data.props = resolveProps(route, matched.props && matched.props[name])
data.attrs = {}

for (const key in data.props) {
if (!('props' in component) || !(key in component.props)) {
data.attrs[key] = data.props[key]
delete data.props[key]
}
}

return h(component, data, children)
}
Expand Down

0 comments on commit 02ae13a

Please sign in to comment.