diff --git a/src/core/observer/watcher.js b/src/core/observer/watcher.js index 3c0589a9..27d7e480 100644 --- a/src/core/observer/watcher.js +++ b/src/core/observer/watcher.js @@ -66,7 +66,7 @@ export default class Watcher { if (!this.getter) { this.getter = function () {} process.env.NODE_ENV !== 'production' && warn( - 'Failed watching path: ' + expOrFn + + `Failed watching path: "${expOrFn}" ` + 'Watcher only accepts simple dot-delimited paths. ' + 'For full control, use a function instead.', vm diff --git a/src/core/util/lang.js b/src/core/util/lang.js index 6cfd8122..4253a735 100644 --- a/src/core/util/lang.js +++ b/src/core/util/lang.js @@ -23,7 +23,7 @@ export function def (obj: Object, key: string, val: any, enumerable?: boolean) { /** * Parse simple path. */ -const bailRE = /[^\w\.]/ +const bailRE = /[^\w\.\$]/ export function parsePath (path: string): any { if (bailRE.test(path)) { return