File tree Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -18,16 +18,23 @@ export default {
1818 props,
1919 inject: {
2020 progress: {
21- default: null
21+ default: undefined
2222 }
2323 },
2424 computed: {
25+ directlyDeclaredProps () {
26+ return Object .keys (this .$options .propsData )
27+ },
28+ injectedProps () {
29+ return this .progress && this .progress .props ? this .progress .props : {}
30+ },
2531 props () {
26- return Object .keys (props).reduce ((props , key ) => {
27- const propUndefined = ! Object .keys (this .$options .propsData ).includes (key)
28- const propInheritedFromProgress = propUndefined && this .progress .props [key]
29- props[key] = propInheritedFromProgress ? this .progress .props [key] : this [key]
30- return props
32+ return Object .keys (props).reduce ((computedProps , key ) => {
33+ const propIsDirectlyDeclared = this .directlyDeclaredProps .includes (key)
34+ const parentPropExists = this .injectedProps [key] !== undefined
35+ const propIsInherited = parentPropExists && ! propIsDirectlyDeclared
36+ computedProps[key] = propIsInherited ? this .injectedProps [key] : this [key]
37+ return computedProps
3138 }, {})
3239 },
3340 progressBarClasses () {
You can’t perform that action at this time.
0 commit comments