File tree Expand file tree Collapse file tree 1 file changed +4
-13
lines changed Expand file tree Collapse file tree 1 file changed +4
-13
lines changed Original file line number Diff line number Diff line change @@ -145,26 +145,17 @@ Watcher.prototype.set = function (value) {
145145 }
146146 // two-way sync for v-for alias
147147 var forContext = scope . $forContext
148- if ( process . env . NODE_ENV !== 'production' ) {
149- if (
150- forContext &&
151- forContext . filters &&
152- ( new RegExp ( forContext . alias + '\\b' ) ) . test ( this . expression )
153- ) {
154- _ . warn (
148+ if ( forContext && forContext . alias === this . expression ) {
149+ if ( forContext . filters ) {
150+ process . env . NODE_ENV !== 'production' && _ . warn (
155151 'It seems you are using two-way binding on ' +
156152 'a v-for alias (' + this . expression + '), and the ' +
157153 'v-for has filters. This will not work properly. ' +
158154 'Either remove the filters or use an array of ' +
159155 'objects and bind to object properties instead.'
160156 )
157+ return
161158 }
162- }
163- if (
164- forContext &&
165- forContext . alias === this . expression &&
166- ! forContext . filters
167- ) {
168159 if ( scope . $key ) { // original is an object
169160 forContext . rawValue [ scope . $key ] = value
170161 } else {
You can’t perform that action at this time.
0 commit comments