|
|
@@ -145,26 +145,17 @@ Watcher.prototype.set = function (value) {
|
|
|
}
|
|
|
// two-way sync for v-for alias
|
|
|
var forContext = scope.$forContext
|
|
|
- if (process.env.NODE_ENV !== 'production') {
|
|
|
- if (
|
|
|
- forContext &&
|
|
|
- forContext.filters &&
|
|
|
- (new RegExp(forContext.alias + '\\b')).test(this.expression)
|
|
|
- ) {
|
|
|
- _.warn(
|
|
|
+ if (forContext && forContext.alias === this.expression) {
|
|
|
+ if (forContext.filters) {
|
|
|
+ process.env.NODE_ENV !== 'production' && _.warn(
|
|
|
'It seems you are using two-way binding on ' +
|
|
|
'a v-for alias (' + this.expression + '), and the ' +
|
|
|
'v-for has filters. This will not work properly. ' +
|
|
|
'Either remove the filters or use an array of ' +
|
|
|
'objects and bind to object properties instead.'
|
|
|
)
|
|
|
+ return
|
|
|
}
|
|
|
- }
|
|
|
- if (
|
|
|
- forContext &&
|
|
|
- forContext.alias === this.expression &&
|
|
|
- !forContext.filters
|
|
|
- ) {
|
|
|
if (scope.$key) { // original is an object
|
|
|
forContext.rawValue[scope.$key] = value
|
|
|
} else {
|