File tree Expand file tree Collapse file tree 1 file changed +12
-11
lines changed Expand file tree Collapse file tree 1 file changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -85,6 +85,18 @@ module.exports = function compileProps (el, propOptions) {
8585 }
8686 }
8787 prop . parentPath = value
88+
89+ // warn required two-way
90+ if (
91+ process . env . NODE_ENV !== 'production' &&
92+ options . twoWay &&
93+ prop . mode !== propBindingModes . TWO_WAY
94+ ) {
95+ _ . warn (
96+ 'Prop "' + name + '" expects a two-way binding type.'
97+ )
98+ }
99+
88100 } else if ( options . required ) {
89101 // warn missing required
90102 process . env . NODE_ENV !== 'production' && _ . warn (
@@ -93,17 +105,6 @@ module.exports = function compileProps (el, propOptions) {
93105 }
94106 }
95107
96- // warn required two-way
97- if (
98- process . env . NODE_ENV !== 'production' &&
99- options . twoWay &&
100- prop . mode !== propBindingModes . TWO_WAY
101- ) {
102- _ . warn (
103- 'Prop "' + name + '" expects a two-way binding type.'
104- )
105- }
106-
107108 // push prop
108109 props . push ( prop )
109110 }
You can’t perform that action at this time.
0 commit comments