From 935c1018da05dbf3124b2dd33619c4a3c82d7a2a Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Sat, 17 Mar 2012 15:57:55 -0700 Subject: fix(ngRepeat): correct variable reference in error message Closese #803 --- src/directive/ngRepeat.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/directive/ngRepeat.js b/src/directive/ngRepeat.js index efa27153..82f8b9c7 100644 --- a/src/directive/ngRepeat.js +++ b/src/directive/ngRepeat.js @@ -73,10 +73,10 @@ var ngRepeatDirective = ngDirective({ } lhs = match[1]; rhs = match[2]; - match = lhs.match(/^([\$\w]+)|\(([\$\w]+)\s*,\s*([\$\w]+)\)$/); + match = lhs.match(/^(?:([\$\w]+)|\(([\$\w]+)\s*,\s*([\$\w]+)\))$/); if (!match) { throw Error("'item' in 'item in collection' should be identifier or (key, value) but got '" + - keyValue + "'."); + lhs + "'."); } valueIdent = match[3] || match[1]; keyIdent = match[2]; -- cgit v1.2.3